LaTeX on amog.fun
Include <script src="/assets/math.js" defer></script> on any page. Math renders with KaTeX, and theorem environments turn into numbered boxes.
Math
Inline $\Hom(A, B) \cong \Hom(B^{*}, A^{*})$, display:
$$\int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt{\pi}$$
Inline $\Hom(A, B) \cong \Hom(B^{*}, A^{*})$, display: $$\int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt{\pi}$$
$$\begin{CD}
A @>f>> B \\
@VgVV @VVhV \\
C @>>k> D
\end{CD}$$
$$\begin{CD} A @>f>> B \\ @VgVV @VVhV \\ C @>>k> D \end{CD}$$
tikz-cd
KaTeX's CD only does square grids. For diagonals, bends and dashes, put tikz-cd source in a text/tikzcd script. Arrow options: direction (u d l r), "label" (add ' for the other side, description to sit on the arrow), no head, dashed, dotted, two heads, maps to, bend left/bend right[=deg]. Spacing: data-row-sep, data-col-sep (em).
<script type="text/tikzcd"> C \arrow[dr, dashed, "\exists!\Phi" description] \arrow[ddr, bend right, "\varphi_A"'] \arrow[drr, bend left, "\varphi_B"] & & \\ & A \oplus B \arrow[d, "p_A"] \arrow[r, "p_B"'] & B \\ & A & </script>
Preamble
Page-specific macros go in a text/tex-preamble script (anywhere in the page). Use \def or \newcommand; \N \Z \Q \R \C are already defined everywhere.
<script type="text/tex-preamble">
\def\im{\operatorname{im}}
\def\set#1{\{#1\}}
</script>
Environments
Available: theorem lemma proposition corollary conjecture definition notation example remark exercise proof. Add * for no number, [...] for a title, and \label{key} with \ref{key} for cross-references.
\begin{definition}[Obby]\label{def:obby}
An <em>obby</em> is a groupoid $\mathcal{O}$ together with a functor
$J\colon \mathcal{O} \to \mathbf{Jump}$ that is faithful but not full.
\end{definition}
\begin{definition}[Obby]\label{def:obby} An obby is a groupoid $\mathcal{O}$ together with a functor $J\colon \mathcal{O} \to \mathbf{Jump}$ that is faithful but not full. \end{definition}
\begin{lemma}[Yoneda]\label{lem:yoneda}
For any functor $F\colon \mathcal{C}\op \to \Set$ and object $c$,
$$\mathrm{Nat}(\Hom(-, c), F) \cong F(c).$$
\end{lemma}
\begin{proof}
Send $\alpha$ to $\alpha_c(\id_c)$.
\end{proof}
\begin{lemma}[Yoneda]\label{lem:yoneda} For any functor $F\colon \mathcal{C}\op \to \Set$ and object $c$, $$\mathrm{Nat}(\Hom(-, c), F) \cong F(c).$$ \end{lemma}
\begin{proof}Send $\alpha$ to $\alpha_c(\id_c)$.\end{proof}
\begin{theorem}
Every obby (\ref{def:obby}) embeds fully into its presheaf category.
\end{theorem}
\begin{proof}
Apply \ref{lem:yoneda}.
\end{proof}
\begin{theorem}Every obby (\ref{def:obby}) embeds fully into its presheaf category.\end{theorem}
\begin{proof}Apply \ref{lem:yoneda}.\end{proof}
\begin{conjecture}[Magnussen]
The obby skill ceiling is not attained.
\end{conjecture}
\begin{remark*}
Starred environments are unnumbered.
\end{remark*}
\begin{conjecture}[Magnussen]The obby skill ceiling is not attained.\end{conjecture}
\begin{remark*}Starred environments are unnumbered.\end{remark*}
Plain HTML works too: <div data-env="lemma" data-title="Yoneda" id="lem:yoneda">…</div>. Anything inside class="no-math", <pre> or <code> is left alone.