# Writing Formulas and Equations (LaTeX)

Updated

LaTeX can be used for math symbols in rubric items, comments, text annotations, answer group names, online assignment questions and responses, and regrade requests and responses. We do not support the single dollar $[LaTeX syntax]$ delimiter format because the single dollar sign used for currency is often misinterpreted as LaTeX and vice versa. We do support the following:

• Inline mode - Put $$ around your LaTeX markup, and Gradescope will render your math expressions inline with text. • Display (Paragraph) mode - Put $$$ delimiters around your LaTeX markup. Your math expressions will appear larger and in a separate paragraph. Note that, for the student-specific comment box, LaTeX does not currently render on the grading page. However, your students will be able to see the properly rendered notation when they view the comment. To double check that your LaTeX comment was rendered correctly, you can go to the Review Grades page and click on the student’s name to see their view of the submission. For a full list of supported functions visit the $$\KaTeX$$ documentation and the mhchem documentation. #### Math Notation ##### Greek Letters Uppercase Lowercase $$\Alpha$$ \Alpha $$\Beta$$ \Beta $$\Gamma$$ \Gamma $$\Delta$$ \Delta $$\Epsilon$$ \Epsilon $$\Zeta$$ \Zeta $$\Eta$$ \Eta $$\Theta$$ \Theta $$\Iota$$ \Iota $$\Kappa$$ \Kappa $$\Lambda$$ \Lambda $$\Mu$$ \Mu $$\Nu$$ \Nu $$\Xi$$ \Xi $$\Pi$$ \Pi $$\Rho$$ \Rho $$\Sigma$$ \Sigma $$\Tau$$ \Tau $$\Upsilon$$ \Upsilon $$\Phi$$ \Phi $$\Chi$$ \Chi $$\Psi$$ \Psi $$\Omega$$ \Omega $$\alpha$$ \alpha $$\beta$$ \beta $$\gamma$$ \gamma $$\delta$$ \delta $$\epsilon$$ \epsilon $$\zeta$$ \zeta $$\eta$$ \eta $$\theta$$ \theta $$\iota$$ \iota $$\kappa$$ \kappa $$\lambda$$ \lambda $$\mu$$ \mu $$\nu$$ \nu $$\xi$$ \xi $$\pi$$ \pi $$\rho$$ \rho $$\sigma$$ \sigma $$\tau$$ \tau $$\upsilon$$ \upsilon $$\phi$$ \phi $$\chi$$ \chi $$\psi$$ \psi $$\omega$$ \omega ##### Superscripts / Subscripts Superscripts can be created using the caret symbol ^ . Subscripts are created using the underscore symbol _. To be more explicit about what characters are in an exponent or subscript you can wrap them with curly brackets { }. Want to render $$CO^2$$ without the italics? ( Like this: $$\ce{CO2}$$ ) Chemistry equations have their own command ( \ce ) to help make input easier. Read the chemistry equation section below for more details.  $$a^2+b^2=c^2$$ $$a^2 + b^2 + c^2$$ Superscripts are written with the ^ symbol. $$y = y_0 + v_0t + \frac{1}{2}at^2$$ $$y = y_0 + v_0t + \frac{1}{2}at^2$$ Subscripts are written with the _ symbol. $$\Psi(x) = Ae^{-\Kappa x} + Be^{\Kappa x}$$ $$\Psi(x) = Ae^{-\Kappa x} + Be^{\Kappa x}$$ Longer superscripts or subscripts need to be surrounded by curly brackets. Without these brackets, $$\LaTeX$$ interprets only the next character to be part of the command. Operators that use subscripts or superscripts  $$\int_{-\infty}^{+\infty} e^{-(ax^2+bx)}dx$$$ $$\int_{-\infty}^{+\infty} e^{-(ax^2+bx)}dx$$$ Integrals can also use superscripts and subscripts to set their limits. Note you will want to use the display/paragraph mode $$ to change the inline integral$$\int$$to the larger one.$$$f(x) = \sum_{n=-\infty}^{\infty} c_ne^{in\pi x/a} $$$$$f(x) = \sum_{n=-\infty}^{\infty} c_ne^{in\pi x/a} $$ In addition, sums also can utilize super/subscripts. ##### Brackets $$(x,y)$$$$ (x,y) $$$$[x,y]$$$$ [x,y] $$$$\{x,y\}$$$$ \{x,y\} $$$$\langle x,y \rangle$$$$ \langle x,y \rangle $$$$|x+y|$$$$ |x+y| $$$$\|x+y\|$$$$ \|x+y\| $$ ##### Matrices $$$\begin{matrix} 1 & 2 & 3 \\ a & b & c \end{matrix}$$$$$\begin{matrix}1 & 2 & 3 \\a & b & c\end{matrix}$$$$$\begin{bmatrix} 1 & 2 & 3 \\ a & b & c \end{bmatrix}$$$$$\begin{bmatrix}1 & 2 & 3 \\a & b & c\end{bmatrix}$$$$$\begin{Bmatrix} 1 & 2 & 3 \\ a & b & c \end{Bmatrix}$$$$$\begin{Bmatrix}1 & 2 & 3 \\a & b & c\end{Bmatrix}$$ Inline matrix$$\big[\begin{smallmatrix} 1 & 2 & 3 \\ a & b & c \end{smallmatrix}\big]$$$$$\big[\begin{smallmatrix}1 & 2 & 3 \\a & b & c\end{smallmatrix}\big]$$ Also checkout our markdown tables for an alternative way of displaying tabular data. Note that currently our editor requires the starting function to be on its own line for these to render properly (like \begin or \big). #### Chemical Formulae Instructors who want to use chemistry equations can make use of the \ce command (from the mhchem package). This extension makes the notation more succinct. For example, you don’t need to use as many explicit exponents and subscripts. Make sure to wrap your$$\LaTeX$$code in $$ (for inline format) or $$ (for block/paragraph format). $$\ce{ H2O }$$$$ \ce{ H2O } $$$$\ce{ NaOH }$$$$ \ce{ NaOH } $$ If you find your equations not looking quite right you can always be more explicit by adding in specific indicators for sub/superscripts (^/_) and specifying the sub/superscript arguments by using curly brackets ( { }). You can see$$\ce{H2O}$$renders fine in all the versions however$$\ce{ SO^{2-}_{4} }$$needs more specificity to handle the negative charge: $$\ce{H2O}$$$$ \ce{ H2O } $$ $$ \ce{ H_2O } $$ $$ \ce{ H_{2}O } $$$$\ce{SO2-4},\ce{SO2-4},\ce{ SO^{2-}_{4} }$$$$ \ce{ SO2-4 } $$ $$ \ce{ SO^2-_4 } $$ $$ \ce{ SO^{2-}_{4} } $$ ##### Charges & Isotopes $$\ce{ H+ }$$$$ \ce{ H+ } $$$$\ce{ Y^99+ }$$$$ \ce{ Y^99+ } $$or$$ \ce{ Y^{99+} } $$$$\ce{ ^{227}_{90}Th+ }$$$$ \ce{ ^227_90Th+ } $$or$$ \ce{ ^{227}_{90}Th+ } $$ ##### Reaction Arrows $$\ce{ A->B }$$$$ \ce{ A->B } $$$$\ce{ A<-B }$$$$ \ce{ A<-B } $$$$\ce{ A<-->B }$$$$ \ce{ A<-->B } $$ To place text above or below the arrow, each arrow can take two optional arguments. $$\ce{ A->[H2O]B }$$$$ \ce{ A->[H2O]B } $$$$\ce{ A->[{text above}][{text below}]B }$$$$ \ce{ A->[{text above}][{text below}]B } $$$$\ce{ A<-->B }$$$$ \ce{ A<-->B } $$ ##### Bonds $$\ce{ C6H5-CHO }$$$$ \ce{ C6H5-CHO } $$$$\ce{ A-B=C#D }$$$$ \ce{ A-B=C#D } $$ Depending on the context \ce{-} can be either a bond, a charge, or a hypen. You can use the bond command \bond followed by a number or a symbol to be more explicit. $$\ce{ A\bond{-}B\bond{=}C\bond{#}D }$$$$ \ce{ A\bond{-}B\bond{=}C\bond{#}D } $$$$\ce{ A\bond{1}B\bond{2}C\bond{3}D }$$$$ \ce{ A\bond{1}B\bond{2}C\bond{3}D } $$ ##### Precipitate and Gas Vertical arrows can be a bit tricky because you need a space between your characters and the arrow symbol for the arrows to render. $$\ce{ SO4^2- + Ba^2+ -> BaSO4 v }$$$$ \ce{ SO4^2- + Ba^2+ -> BaSO4 v } $$$$\ce{ A v B (v) -> B ^ B (^) }$$$$ \ce{ A v B (v) -> B ^ B (^) } $$ Have more questions about using$$\LaTeX on Gradescope? Contact Us!

Awesome, glad that it's helpful! 🙌 Have ideas on how we can improve? Sorry to hear that. Let us know what we can improve!