cb94b2c Apr 26, 2019
5 contributors

### Users who have contributed to this file

133 lines (80 sloc) 8.81 KB

# CASText

## Introduction

CASText is CAS-enabled text. CASText is simply HTML into which LaTeX mathematics and CAS commands can be embedded. These CAS commands are executed before the question is displayed to the user. Use only simple LaTeX mathematics structures. Only a small part of core LaTeX is supported.

Many of the fields in a STACK question, such as the question text, are of this type.

Information about Basic HTML is available elsewhere.

Currently STACK does not process the LaTeX itself. It is displayed on the user's browser in a variety of ways, such as using MathJax. If you do not know how to use LaTeX, some simple examples are given in the author FAQ.

The following things to remember about CASText:

• Anything enclosed between $$....$$ symbols is treated as an inline equation, as is the case with normal LaTeX.
• Anything enclosed between matching $ and $ is treated as a displayed equation, in the centre of a new line. Again, this is the case with LaTeX.

## Facts

STACK has an in-built formula sheet. This used to be called a "hints" system, but the word hint is used elsewhere in Moodle so this is now called "facts". Parts of this can be added to CASText using the fact sheet

## Most useful HTML

HTML Paragraphs (don't forget the end tag!)

<p>This is a paragraph</p>
<p>This is another paragraph</p>


HTML Line Breaks

Use the <br /> tag if you want a line break (a new line) without starting a new paragraph:

<p>This is<br />a para<br />graph with line breaks</p>


Some formatting

<em>This is emphasis</em>

<b>This text is bold</b>

<big>This text is big</big>

<i>This text is italic</i>

<code>This is computer output</code>

This is <sub>subscript</sub> and <sup>superscript</sup>


## Useful LaTeX

LaTeX notation can specify inline or display mode for maths by delimiting with \( or \[ respectively. Here are some simple examples:

• x^2 gives (x^2)
• x_n gives (x_n)
• x^{2x} gives (x^{2x})
• \alpha\beta gives (\alpha\beta)
• \sin(3\pi x) gives (\sin(3\pi x))
• \frac{1}{1-n^2} gives (\frac{1}{1-n^2}) when inline. In display mode it gives:

[ \frac{1}{1-n^2} ]

• \int_a^b x^2\ dx gives (\int_a^b x^2\ dx) when inline. In display mode it gives:

[ \int_a^b x^2\ dx ]

There is a specific page for actuarial notation.