All about LaTeX on Thuses


General Overview

Thuses supports standard LaTeX notation. We use QuickLatex for converting LaTeX into images. We recommend using the Text tab in the editor to avoid problems when writing equations. In particular, you should not have line breakers in your equations.

For inline math formulas use $…$ or \(…\) environments. For display equations use $$…$$ or \[…\] environments. For example,

Consider $f\colon A \to B$ given by...Consider \(f\colon A \to B\) given by…
Consider \(x^2 + y^2 = z^2\) for \(x,y,z \in \mathbf{Z}\)Consider \(x^2 + y^2 = z^2\) for \(x,y,z \in \mathbf{Z}\)
Consider $$\int_U f(u)\,du$$Consider

\[\int_U f(u)\,du\]

Consider \[\int_{-\infty}^{\infty} f(x)\,dx\]Consider

\[\int_{-\infty}^{\infty} f(x)\,dx\]

Thuses also supports the following environments: equation, align, displaymath, eqnarray, multline, flalign, gather, and alignat. For example,

\begin{equation}\label{eq:zeta} \zeta(s) = \sum_{n=1}^{\infty}n^{-s} = \frac{1}{1^s} + \frac{1}{2^s} + \frac{1}{3^s} + \dots \end{equation}


 (2)\begin{equation*} \zeta(s) = \sum_{n=1}^{\infty}n^{-s} = \frac{1}{1^s} + \frac{1}{2^s} + \frac{1}{3^s} + \dots \end{equation*}

You can reference the equation above using (\ref{eq:zeta}) to get (2).

Available LaTeX packages

Currently, we support the following packages by default: amsmath, amsfonts, amssymb, enumitem, mathrsfs, mathtools, stmaryrd, upgreek, tikz-cd. So for instance, if you want to type a commutative diagram using the tikz-cd package, simply do

\begin{tikzcd} A \ar{r} \ar{d} & B \ar{d} \\ C \ar{r} & D \end{tikzcd}

which produces the diagram \begin{tikzcd} A \ar{r} \ar{d} & B \ar{d} \\ C \ar{r} & D \end{tikzcd}

Global preambles and LaTeX packages

As of 06/17/2021, we now support defining global preambles on Thuses. For instance, suppose you wish to import the package eucal and define various commands, e.g. for typing things like \(\mathbf{Z}\), \(\mathbf{N}\), etc. Then you can set up a global preamble as follows:

![preamble] \usepackage{eucal} \newcommand{\Z}{\mathbf{Z}} % The integers. \newcommand{\N}{\mathbf{N}} % The nonnegative integers. \DeclareMathOperator{\GL}{GL} [preamble]

What is not supported on Thuses?

QuickLaTeX works by converting LaTeX code into images, and then embeds these image into html. Because of this, there are several things that you cannot do with QuickLaTeX that you would normally be able to do on your computer.

  1. Theorem environments – We do note support theorem environments with the amsthm package. You will need to create your own theorem environment by hand. For example:Theorem 1 (Cohomology and base change): Let \(f: X \to S\) be a proper morphism…We suggest that you use bold for words like “Theorem”, “Proposition”, “Lemma”, etc. Note that as a result of having to create your own theorem environment manually, there is no way to label theorems and then reference them. You will need to number them (and keep track of the numbering!) by yourself.
  2. Bibliographies – QuickLaTeX does not support this as well. We suggest writing a list at the end of your post using the editor, and then manually referring to that list in the bibliography. Alternatively, you can write things like:
    • “By (Tag 08EU of the Stacks project), the formation of \(Rf_\ast E\) commutes with…”
    • “Since \(A\) is Noetherian and zero-dimensional, by (Atiyah-Macdonald, Theorem 8.5) it is Artinian.”