Text Formatting

jemdoc-rs provides several inline formatting options.

Basic Formatting

Markup
*Bold text*
/Italic text/
_Underlined text_
+Monospace text+

Renders as: Bold text, italic text, underlined text, monospace text.

Combining Styles

You can nest formatting markers:

  • Bold italic

  • Bold underline

  • Italic underline

  • Bold monospace

Special Characters

Markup Renders as Description
---  —  Em dash
-- En dash
... Ellipsis
~   Non-breaking space
\R ® Registered trademark
\C © Copyright
\M · Middle dot

Quotes

jemdoc-rs converts straight quotes into typographic (curly) quotes:

  • Double quotes: “like this”

  • Single left quote: ‘like this

  • Apostrophe: it's automatic

Escaping

Precede any special character with a backslash to output it literally:

  • \* produces *

  • \/ produces /

  • \_ produces _

  • \+ produces +

  • \~ produces ~

  • \# produces #

  • \$ produces $

  • \\\ produces \

Monospace with Percent Signs

Use percent signs for monospace that preserves special characters inside:

%<div class=“example”>% renders as: <div class="example">

Line Breaks and Paragraph Breaks

A backslash-n (\n) forces a line break within a paragraph.
Like this.

A backslash-p (\p) forces a new paragraph mid-block.

Like this — a new paragraph without blank lines in the source.

Comments

Lines starting with # are comments and do not appear in the output:

# This is a comment---you cannot see it in the rendered page.
The line above this paragraph is a comment in the source.

The line above this paragraph is a comment in the source.

Headings

jemdoc-rs supports four levels of headings using = signs:

= Page Title (H1)
== Section (H2)
=== Subsection (H3)
==== Sub-subsection (H4)

This is H1

This is H2

This is H3

This is H4

In a .jemdoc source, if some level of headings is used directly after the # jemdoc: configurations without blank lines, it will also sets the browser window title unless overridden by the title directive.