Math Course
If you really think about writting a math lecture online, I strongly suggest you use Sphinx which provides much more features than Hugo for documentation:
- Cross Reference
- Output formats: PDF (through LaTeX), HTML, epub, …
- Javascript can be inserted (for the html output)
- Theorems are available with a plugin
You can see an example here. Do not forget that the theme (the design, layout, …) can be changed easily.
Academic-Tools: a plugin to enhance Wowchemy
You may have see that my course are online, no pdf files but directly as webpages. I explain here how to achieve a similar result, using hugo
and the Wowchemy
theme.
The Wowchemy
theme provides a nice layout (=design) for documentation. The math expression can be written mostly as in a basic $\LaTeX$ file thanks to MathJax (just set math = true
in the frontmatter of your .md
file). Some features were however missing for a math course, especially the “AMS Theorem environment” of $\LaTeX$.
I have developped a package, academic-tools, which contains Hugo shortcodes to mimic amsthm
$\LaTeX$ Package. A shortcode is a portion of code that Hugo
will escape from the Markdown, making it possible to call external functions inside the Markdown. It features
- Customizable design
- Different type: Theorem, Proposition, Lemma, Corollary, Definition
- Theorem naming
- Cross reference
- Multi languages
- Proof environment
- Auto numbering (using CSS)
Example
Thm blocks
{{< thm/thm type="theorem" name="of me" label="thm:me">}}
This theorem proves that covfefe.
{{< /thm/thm >}}
{{< thm/proof >}}
The proof is very good. I like proof. I have big proof.
{{< /thm/proof >}}
leads to this
You can change type="theorem"
by proposition
, lemma
, corollary
or definition
.
Cross reference
A “theorem” can moreover be referenced using thm/ref
using three different ways:
- Inline implicite (order of arguments matters) :
Personally, my favorite is the {{< thm/ref "thm:me" "covfefe Theorem" />}}.
Personally, my favorite is the covfefe Theorem. 2. Inline explicite (order of arguments does not matter!):
Personally, my favorite is the {{< thm/ref ref="thm:me" text="covfefe Theorem" />}}.
Personally, my favorite is the covfefe Theorem. 3. Environment:
Personally, my favorite is the {{< thm/ref "thm:me">}}covfefe Theorem{{< /thm/ref >}}.
Personally, my favorite is the covfefe Theorem.
Installation
Please refer to the README file of the repository.