This page briefly describes some pieces of the input syntax for CAT-SOOP pages.

<section>Markdown</section>

Markdown works as expected, plus \$...\$ can be used for $\LaTeX$-style math.

* This is **bold**.
* This is _italicized_.
* This is `teletype`.

Some math:

$$-1 + \frac{1}{3} - \frac{1}{5} + \frac{1}{7} - \frac{1}{9} + \cdots = \sum_{n=1}^\infty \frac{\left(-1\right)^n}{2n - 1} = -\frac{\pi}{4}$$

Math is rendered with $\KaTeX$ (<https://github.com/Khan/KaTeX>) when possible,
and with MathJax (<https://www.mathjax.org/>) as a fallback.

<section>Python</section>

Python code can be included within <code>&lt;python&gt;</code> tags.  Anything
that is printed within these tags will be rendered to the screen.  For example,
the following is a random number generated by Python:
<python>
import random
print(random.randint(0, 20))
</python>

There is also a shorter syntax for including pre-computed values.  `\@{...}`
can be used to print a single value.  For example: @{random.randint(30, 70)}

It is also possible to specify how the value should be formatted.  For example:
@%.02f{7}

<section>Images and Hyperlinks</section>

Images and hyperlinks can be included using regular HTML or Markdown syntax:

<a href="COURSE/markdown/stinkbug.png">Link</a>

![stinkbug](CURRENT/stinkbug.png)

In either case, the `src` or `href` can either be a regular URL, or it can be a
special form for use within CAT-SOOP.  For locations starting with `CURRENT`,
CAT-SOOP will start looking in the current directory.  For locations starting
with `COURSE`, CAT-SOOP will start looking the course's root directory.

These kinds of lookups first look for a regular CAT-SOOP page with the given
name.  If one isn't found, CAT-SOOP will look in the corresponding `__STATIC__`
directory.

<section>Question</section>

One of the main uses of CAT-SOOP is to collect and assess responses to questions.
This is handled with the <code>&lt;question&gt;</code> tag, which is decribed
in more detail [on this page](COURSE/questions).

<question number>
csq_prompt='What is 2+2? '
csq_soln='4'
</question>
