# Display Notation with LaTeX

You can include LaTeX markup to display well-formatted math notation in your questions and assignments in WebAssign. Unlike WaTeX, LaTeX is displayed as a static image in your questions and does not offer the flexibility to include answer boxes in your math notation.

Note WebAssign's LaTeX installation does not include every LaTeX package. Always test your notation to ensure that it displays correctly.

Use LaTeX to display math notation for the following reasons:

• You need to display a formatted solution or learning materials as a PDF that is linked from your question or assignment.
• You are already familar with LaTeX and do not want to use another method for displaying math notation.

If you are not already familiar with LaTeX and do not need to display notation as a PDF, use WaTeX, the <symimage> tag, or HTML substitution.

To include LaTeX markup in your question or assignment, enclose it in the <latex> tag:

<latex>latex_markup</latex>

## Displaying Perl Variables in LaTeX

To display the values of Perl variables in your LaTeX markup (for example, to use randomized values), use one of the methods described in the following table.

Method

Code

Example

Display

Display value in red

$variable ${variable}

Use braces or add a space after each variable name to distinguish it from other text.

<latex>{p}x=13
$</latex> 3x = 13 Display value in black <EQN$variable>

Do not use the lowercase <eqn> tag.

<latex>$<EQN$p>x=13
$</latex> 3x = 13 Display all values in black <latex eqn=black>$variable

<latex eqn=black>${variable} Use braces or add a space after each variable name to distinguish it from other text. <latex eqn=black>$
${p}x=13$</latex>
3x = 13

## Displaying LaTeX as a PDF

To display a larger set of LaTeX notation than a single mathematical expression — for example, to use LaTeX to format a solution or additional learning materials — you can display your LaTeX markup as a PDF that is linked from the question or assignment.

To display your LaTeX markup as a linked PDF, set the pdf attribute in the <latex> tag to the text of the link you want your students to click:

<latex pdf='link_text'>