# Creating math equations

Math equations can some of the time be displayed using the regular keys on your keyboard and sans any fancy scripting.  At other times, you need to write a complex equation for students to see, or students need to be able to submit equations in their responses. In order to do that, you can use LaTeX code, which is a markup language. On the Lagunita platform, we use MathJaX to enable LaTeX expressions to display properly.

There are a few different syntaxes that are accepted on the platform, and depending on how you want something to appear and where you want something to appear, you'll want to use a different syntax.

### 1. Five different syntaxes

These are the five different math syntaxes you can use to display LaTeX in your course.

$$...$$

$...$

$...$

[mathjaxinline]...[/mathjaxinline]

[mathjax]...[/mathjax]

### 2. Where, what, how

 Where $$...$$ $...$ $...$ [mathjaxinline]...[/mathjaxinline] [mathjax]...[/mathjax] HTML components (e.g. Text, Raw HTML) Displays inline equation. Displays equation on a new line. Not supported. Displays inline equation. Displays equation on a new line. Basic Problem components (e.g. Checkboxes, Dropdown, Multiple Choice) Displays inline equation. Displays equation on a new line. Not supported. Displays inline equation. Displays equation on a new line. Notes: LaTeX is partially supported in Dropdown response options. Output may be mixed. $$...$$ is recommended for [explanation] elements. $...$ will also work in [explanation] elements if first wrapped in

tags in the Advanced Editor.   LaTeX is not supported in Numerical or Text Input response submissions.   Go to the Advanced Settings page in Studio and enter “true” next to the Enable LaTeX Compiler policy to enable participants to enter equations without any framing syntax. Advanced Problem components (e.g. Math Expression Input, Custom Javascript Display and Grading, Custom Python-Evaluated Input, Drag and Drop) Displays inline equation. Displays equation on a new line. Not supported. Displays inline equation. Displays equation on a new line. Note: Go to the Advanced Settings page in Studio and enter “true” next to the Enable LaTeX Compiler policy to enable participants to enter equations without any framing syntax in Math Expression Input submissions. Advanced Problem Components (Peer Assessment) Displays inline equation. Displays equation on a new line. Not supported. Displays inline equation. Displays equation on a new line. Note: Enable participants to include equations in their submissions by: going to the Settings tab in the Peer Assessment problem and selecting “True” in the “Allow Latex Responses” dropdown menu. going to the Advanced Settings page in Studio and entering “true” next to the Enable LaTeX Compiler policy. * * This second step will add additional Advanced Problem Components specifically for Latex responses, which don’t require any framing syntax (entering y\sin^2 x will work but $$y\sin^2 x$$ will not). About page Not supported. Not supported. Not supported. Not supported. Not supported. Note: Upload an image of your equation and embed the image. Course Info page Not supported. Not supported. Not supported. Not supported. Not supported. Note: Upload an image of your equation and embed the image. Discussion page (e.g Post, Comment) Displays inline equation. Displays equation on a new line. Displays inline equation. Displays inline equation. Displays equation on a new line. Note: For the best results, use $...$ syntax. If using $$...$$ or $...$ syntaxes, start a new line and wrap syntax in HTML (

...

). Wiki page Not supported. Not supported. Displays inline equation. Not supported. Not supported. Static page Not supported. Not supported. Not supported. Not supported. Not supported. Note: Upload an image of your equation and embed the image.

### Workarounds?

For locations in your course where LaTeX is not supported, such as the Course Info page, you may still need to display an equation.  A workaround you can try is to take a picture or screen capture of the equation and upload the image file to your Files & Uploads page in Studio.  From there, you can copy the image embed URL and add this URL as an image source to the page.