Special Characters
All available characters are valid Markdown. Here we talk about the ones that need special care: ASCII markup characters, HTML entities & exotic UTF-8 symbols.
Escaping formatting Characters
The characters reserved for Markdown formatting are not directly available anymore. To use them literally we need to escape them by adding a backslash \
in front.
When we escape a number sign \#
for example it’s just the number sign ‘#’.
HTML Entities
Entities are ASCII codes for Unicode characters. These codes begin with an ampersand &
and end with a semicolon ;
. For example:
¶
- means the paragraph ¶ .
§
- means the section § .
ℝ
- means the set of real numbers ℝ .
For more exotic ones you should check, if they are available in the IBM Plex fonts this theme is shipping with.
If a character is missing there, the browsers will first try to use a local font and may display a glyph with a more or less noticeable different shape. And if they can’t find a representation for the character anywhere, they will display an ugly placeholder glyph. You may take a good look at the ℝ in the last example. The Plex fonts provide no glyphs for the real set but there is usually one available in system fonts and will differ more or less in shape.
Please remember the often neglected sets of general entities, which are meant to facilitate nice typography — the ones for spacing and (not) breaking.
Spacing
Good typography needs the right amount of space between type. For the most part this is the job of the web designer. But the horizontal spacing between words and characters remain the responsibility of the editor. The following HTML entities are available in Plex and many other good fonts:
Name | Entity Code | Example |
---|---|---|
No space (for comparison) | xx | |
Hair space |   | x x |
Thin space |   | x x |
Normal space | Space | x x |
Punctuation space |   | x x |
en space (wide as an n) |   | x x |
numeric space |   | x x |
em space (wide as an m) |   | x x |
Breaking Words — or not
The major browsers do support hyphenation for a few important languages and we usually don’t need to place soft hyphens.
The non-breaking entities are meant for situations where characters or words should never be separated by a new line.
Name | Code | Example |
---|---|---|
Soft hyphen (optional break) | ­ | xx |
Zero width joiner | ‍ | xx |
Narrow non breaking space |   | x x |
Non breaking space | | x x |
Emojis
We can always place them directly as UTF-8 characters into the content without any configuration. 🤘
Hugo supports emojis via codes like 🥴 (:woozy_face:
) in Markdown content, if we set the global parameter enableEmoji
to true
.
There are quite a lot of emojis according to this cheat sheet which also allows you to copy them easily. Have fun — but don’t forget that serious web pages are not personal chat. 🙏