Math Typesetting

Mathematical formulas written in LaTeX notation can be rendered to HTML without using javascript.

Rendering can take place either globally, or in specific locations using a built-in shortcode.

  1. To render math globally, enable the passthrough extension in the site configuration.

    Inline formulas such as $y=ax+b$ are supported, displayed formulas as well:
    
    $$
      e^{i\pi}+1=0
    $$
  2. To render mathematical expressions in specific locations, surround them with the math shortcode:

    Inline formulas such as {{< math >}}y=ax+b{{< /math >}} are supported, displayed formulas as well:
    
    {{< math displayMode=true >}}
      e^{i\pi}+1=0
    {{< /math >}}

Note: Use the online reference of Supported TeX Functions

Examples

Inline math: φ=1+52=1.6180339887\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…

φ=1+11+11+11+ \varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }

Emoji Support

Emoji can be enabled in a Hugo project in a number of ways.

The emojify function can be called directly in templates or Inline Shortcodes.

To enable emoji globally, set enableEmoji to true in your site’s configuration and then you can type emoji shorthand codes directly in content files; e.g.

🙈 :see_no_evil: 🙉 :hear_no_evil: 🙊 :speak_no_evil:


The Emoji cheat sheet is a useful reference for emoji shorthand codes.


N.B. The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g.

.emoji {
  font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
}

Page Bundle

Occaecat aliqua consequat laborum ut ex aute aliqua culpa quis irure esse magna dolore quis. Proident fugiat labore eu laboris officia Lorem enim. Ipsum occaecat cillum ut tempor id sint aliqua incididunt nisi incididunt reprehenderit. Voluptate ad minim sint est aute aliquip esse occaecat tempor officia qui sunt. Aute ex ipsum id ut in est velit est laborum incididunt. Aliqua qui id do esse sunt eiusmod id deserunt eu nostrud aute sit ipsum. Deserunt esse cillum Lorem non magna adipisicing mollit amet consequat.

Bryce Canyon National Park

Sit excepteur do velit veniam mollit in nostrud laboris incididunt ea. Amet eu cillum ut reprehenderit culpa aliquip labore laborum amet sit sit duis. Laborum id proident nostrud dolore laborum reprehenderit quis mollit nulla amet veniam officia id id. Aliquip in deserunt qui magna duis qui pariatur officia sunt deserunt.