Skip to content

Instantly share code, notes, and snippets.

@marnix
Last active August 6, 2017 12:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marnix/dbfdbd690d8e3e30f1d7 to your computer and use it in GitHub Desktop.
Save marnix/dbfdbd690d8e3e30f1d7 to your computer and use it in GitHub Desktop.
MathJax \calc

$% \require{begingroup} \begingroup \newcommand{\calc}{\begin{align} \quad &} \newcommand{\op}[1]{\ #1 \quad & \quad \unicode{x201c}} \newcommand{\hints}[1]{\mbox{#1} \ \quad & \quad \phantom{\unicode{x201c}} } \newcommand{\hint}[1]{\mbox{#1} \unicode{x201d} \ \quad & } \newcommand{\endcalc}{\end{align}} \newcommand{\subcalch}[1]{\ \quad & \quad #1 \ \quad &} \newcommand{\subcalc}{\quad \begin{aligned} \quad & \ \bullet \quad & } \newcommand{\endsubcalc}{\end{aligned} \ \ \cdot \quad &} \newcommand{\Ref}[1]{\text{(#1)}} \newcommand{\then}{\Rightarrow} \newcommand{\when}{\Leftarrow} %$

Example: $$\calc 1 + 2 \op> \hints{order on $;\mathbb Z;$, using axiom $\Ref A$} \hints{-- this seems one of the} \hint{simplest things to try} 0 + 2 \op=\hint{\Ref {E}} 0 \endcalc$$

$% \endgroup %$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment