Emphasis
To emphasize some text, surround it with *
s or _
, like this:
This text is _emphasized with underscores_, and this
is *emphasized with asterisks*.
Double *
or _
produces strong emphasis:
This is **strong emphasis** and __with underscores__.
A *
or _
character surrounded by spaces, or backslash-escaped, will not trigger emphasis:
This is * not emphasized *, and \*neither is this\*.
Because _
is sometimes used inside words and identifiers, pandoc does not interpret a _
surrounded by alphanumeric characters as an emphasis marker. If you want to emphasize just part of a word, use *
:
feas*ible*, not feas*able*.
Strikeout
Pandoc extension.
To strikeout a section of text with a horizontal line, begin and end it with ~~
. Thus, for example,
This ~~is deleted text.~~
Superscripts and subscripts
Pandoc extension.
Superscripts may be written by surrounding the superscripted text by ^
characters; subscripts may be written by surrounding the subscripted text by ~
characters. Thus, for example,
H~2~O is a liquid. 2^10^ is 1024.
If the superscripted or subscripted text contains spaces, these spaces must be escaped with backslashes. (This is to prevent accidental superscripting and subscripting through the ordinary use of ~
and ^
.) Thus, if you want the letter P with ‘a cat’ in subscripts, use P~a\ cat~
, not P~a cat~
.
Verbatim
To make a short span of text verbatim, put it inside backticks:
What is the difference between `>>=` and `>>`?
If the verbatim text includes a backtick, use double backticks:
Here is a literal backtick `` ` ``.
(The spaces after the opening backticks and before the closing backticks will be ignored.)
The general rule is that a verbatim span starts with a string of consecutive backticks (optionally followed by a space) and ends with a string of the same number of backticks (optionally preceded by a space).
Note that backslash-escapes (and other markdown constructs) do not work in verbatim contexts:
This is a backslash followed by an asterisk: `\*`.
Attributes can be attached to verbatim text, just as with delimited code blocks:
`<$>`{.haskell}