# Blocks: LATEX

## Change View to Source

In general, it is easier to edit code blocks by looking at the source view.  Select "Source" from the "View" dropdown box as in the following image:

## The PRE Tag

Similar to adding a code block, we need to create a PRE tag. Suppose we want to create a simple equation for x hat. We can use the following code:

<pre function="math.formula" class="script"> $\hat{x}$ </pre>

which will get rendered as:

### Inline Equations

If you want code to appear inline, such as "We define a variable $\hat{x}$ to represent...," you need to use a different syntax which is unfortunately a little harder to use. Instead of using the PRE tag, we can use the {{math.Formula}} tag such as:

"We define a variable {{math.Formula{formula: "$\\hat{x}$"} }} to represent..."

NOTE: You need to write all slash ( \ ) characters twice, which makes pasting from your favorite TeX editor somewhat combersome.

The above example will get rendered as:

"We define a variable to represent..."