Formatting text

Basic styles

Inside paragraphs (and in other elements that support it) you can use text formatting syntax that allows you to give text a certain style. Text formatting is applied enclosing a set of words between two identical symbols. Currently Mau supports

  • _underscore_
  • *star*
  • ~tilde~
  • ^caret^
  • `backtick`
Mau source code
Stars identify *strong* text.

Underscores for _emphasized_ text.

Carets for ^superscript^ and tildes for ~subscript~.

Backticks are used for `verbatim` text.

$Dollars_and_percents$ are %used_to_escape_text%

Stars identify strong text.

Underscores for emphasized text.

Carets for superscript and tildes for subscript.

Backticks are used for verbatim text.

Dollars_and_percents are used_to_escape_text

<p>Stars identify <strong>strong</strong> text.</p>

<p>Underscores for <em>emphasized</em> text.</p>

<p>Carets for <sup>superscript</sup> and tildes for <sub>subscript</sub>.</p>

<p>Backticks are used for <code>verbatim</code> text.</p>

<p>Dollars_and_percents are used_to_escape_text</p>

Split styled text

While paragraphs can be split into multiple contiguous lines, you cannot split styled parts of the paragraph. The beginning and the end of the style must be on the same line.

Mau source code
This is a *paragraph*
on _multiple_ lines.

This is _splitting
the style syntax_,
and doesn't work.

This is a paragraph on multiple lines.

This is _splitting the style syntax_, and doesn't work.

<p>This is a <strong>paragraph</strong> on <em>multiple</em> lines.</p>

<p>This is _splitting the style syntax_, and doesn't work.</p>

Mixing text styles

The four text styles underscore, star, tilde, and caret can be used together with results that depend on the output format.

Mau source code
You can have _*strong and emphasized*_ text.

You can also apply styles to _*`verbatim`*_.

You can have *^strong superscript^* text or ^*superscript strong*^ (with the same result).

You can have strong and emphasized text.

You can also apply styles to verbatim.

You can have strong superscript text or superscript strong (with the same result).

Apply styles to parts of a word

Styles can be applied to parts of words and do not require surrounding spaces.

Mau source code
*S*trategic *H*azard *I*ntervention *E*spionage *L*ogistics *D*irectorate

It is completely _counter_intuitive.

Parts of words can be ^super^script or ~sub~script.

There are too many `if`s in this function.

Strategic Hazard Intervention Espionage Logistics Directorate

It is completely counterintuitive.

Parts of words can be superscript or subscript.

There are too many ifs in this function.

Verbatim and styled text

The backticks preserve the text verbatim, but also style it as code. This means that style syntax inside backticks is not interpreted.

Mau source code
Backticks `_*preserve*_` the text verbatim.

Backticks _*preserve*_ the text verbatim.

Escaping style markers with backslash

Using a single style marker like _ or * doesn't trigger any effect. If two or more appear independently on a single line, however, you have to escape them to prevent Mau from styling the text they surround. One way to escape them is to use a backslash

Mau source code
You can use _single *markers.

But you \_need\_ to escape pairs.

Even though you can escape \_just one_ of the two.

If you have \_more than two\_ it's better to just \_escape\_ all of them.

You can use _single *markers.

But you _need_ to escape pairs.

Even though you can escape _just one_ of the two.

If you have _more than two_ it's better to just _escape_ all of them.

Escaping style markers with dollar and percent

Multiple backslashes can easily become difficult to read, so you can use the dollar sign $ or the percent sign % to escape text.

Mau source code
You $can_just_use_dollars$ and %percents_which_escape_everything%.

Actually $dollars escape %percents%$, and %percents escape $dollars$%.

You can_just_use_dollars and percents_which_escape_everything.

Actually dollars escape %percents%, and percents escape $dollars$.

The purpose of `backticks` is to format code, while the purpose of dollar $ and percent % is just to make it less complicated to represent text that has a lot of special symbols. Dollars and percents escape each other as they are pretty common symbols that you might need to use.

Special characters

The definition of special character depends on the output format. In HTML, characters like < and > cannot be used directly as they clash with the markup language syntax. Mau tries as much as possible to automatically escape characters that might be problematic if they don't clash with its own syntax. For example, as this manual is rendered in HTML, I can use the word <tag> without having to escape the angle brackets.

Unicode

Unicode characters can be used directly in the Mau source code, if your editor supports them. This is a volcano: 🌋.