Custom $\KaTeX$ Macros

More efficient math editing

Background

Same as the last section in Beautiful Hugo Improvements.

Goal

To write math efficiently by automatically loading longer code with shorter macro code.

For example, when I wrote Some Infinite Cardinality Identities, it would be ten times more quicker and efficient to type \card{C} than to write \mathop{\mathrm{card}}(C) all the time.

Changes committed to my repo

The current version of Beautiful Hugo is still using $\KaTeX$ v0.7, which doesn’t support macros in auto-rendering. It would be inconvenient to include the macros after invoking $\KaTeX$’s render function.

[Read More]
Hugo  KaTeX  math 

Math Sample

Using KaTeX

This is a sample created by the developer of Beautiful Hugo.

KaTeX can be used to generate complex math formulas server-side.

$$ \phi = \frac{(1+\sqrt{5})}{2} = 1.6180339887\cdots $$

Additional details can be found on GitHub or on the Wiki.

[Read More]