SGML

Markdown Typography Examples

asterisk1
Basic emphasis example
double-asterisk0
Basic strong emphasis example
double-asterisk1
Two strong emphasis spans next to another
asterisk3
Asterisk and underscore characters next to blanks aren't considered special characters
asterisk4 underscore1
Special behaviour of underscore (as opposed to asterisk) characters
backslash-escape0 backslash-escape1 backslash-escape2
Escaping of special characters using backslashes
backticks0 backticks1 backticks2 double-backticks0 double-backticks1 double-backticks2
Examples for backticked code spans
underscore-in-backticks0
Undescore characters in backticks
hard-break0 hard-break1 hard-break2
Hard breaks

asterisk1

This tests *two* *emphasized* texts chunks next to another, with blank in between.

Rendered HTML

<p>This tests <em>two</em> <em>emphasized</em> texts chunks next to another, with blank in between.
</p>

double-asterisk0

This demonstrates using **double asterisks** to strongly emphasize text.

Rendered HTML

<p>This demonstrates using <strong>double asterisks</strong> to strongly emphasize text.
</p>

double-asterisk1

This demontrates **two****consecutive** strongly emphasised text portions.

Rendered HTML

<p>This demontrates <strong>two</strong><strong>consecutive</strong> strongly emphasised text portions.
</p>

asterisk3

This goes to show that an * asterisk* without directly following non-blank text
isn't interpreted as emphasis syntax,
and neither is an *asterisk * without directly *preceding* non-blank text.
Note that pandoc behaves somewhat different: it will put the 2nd "asterisk"
(and "preceding") in em tags.

Rendered HTML

<p>This goes to show that an * asterisk* without directly following non-blank text
isn't interpreted as emphasis syntax,
and neither is an <em>asterisk * without directly *preceding</em> non-blank text.
Note that pandoc behaves somewhat different: it will put the 2nd "asterisk"
(and "preceding") in em tags.
</p>

asterisk4

This is put in "em" tags: *text*subsequent non-space,
and so is this: preceding non-space*text*
and this: nonspace*text*nonspace
(as opposed to underscore1.txt)

Rendered HTML

<p>This is put in "em" tags: <em>text</em>subsequent non-space,
and so is this: preceding non-space<em>text</em>
and this: nonspace<em>text</em>nonspace
(as opposed to underscore1.txt)
</p>

underscore1

This isn't put in "em" tags: _text_subsequent non-space,
and neither is this: preceding non-space_text_
or this: nonspace_text_nonspace
(as opposed to asterisk4.txt)

Rendered HTML

<p>This isn't put in "em" tags: _text_subsequent non-space,
and neither is this: preceding non-space_text_
or this: nonspace_text_nonspace
(as opposed to asterisk4.txt)
</p>

backslash-escape0

This backslash escapes `*`: \*.
And this one: \_ escapes `_`.

Rendered HTML

<p>This backslash escapes <code>&#42;</code>: &#42;.
And this one: &#95; escapes <code>&#95;</code>.
</p>

backslash-escape1

A backslash can escape backticks like this: \`this isn't code\`.

Rendered HTML

<p>A backslash can escape backticks like this: &#96;this isn't code&#96;.
</p>

backslash-escape2

Backslashes have no special interpretation within backticks.
as `shown \\ here`.
`Backslashes preceeding a backtick\` in backticked verbatim text` are
no exception to this (so the backticked ends after the backslash).

Rendered HTML

<p>Backslashes have no special interpretation within backticks.
as <code>shown &#92;&#92; here</code>.
<code>Backslashes preceeding a backtick&#92;</code> in backticked verbatim text` are
no exception to this (so the backticked ends after the backslash).
</p>

backticks0

This test `span-level code blocks`.

Rendered HTML

<p>This test <code>span-level code blocks</code>.
</p>

backticks1

Within `backticks`, reserved HTML characters (such as `<`, `>`, or `&`)
get replaced by character entities.

Rendered HTML

<p>Within <code>backticks</code>, reserved HTML characters (such as <code>&#60;</code>, <code>&#62;</code>, or <code>&#38;</code>)
get replaced by character entities.
</p>

backticks2

This is how you write HTML character entities verbatim: `&amp;`, `&lt;`, `&gt;`

Rendered HTML

<p>This is how you write HTML character entities verbatim: <code>&#38;amp;</code>, <code>&#38;lt;</code>, <code>&#38;gt;</code>
</p>

double-backticks0

Within `backticked code, a sequence of two consecutive backticks `` are
reproduced as two backticks`, so don't expand to a single backtick,
like, say, in SQL.

Rendered HTML

<p>Within <code>backticked code, a sequence of two consecutive backticks `` are
reproduced as two backticks</code>, so don't expand to a single backtick,
like, say, in SQL.
</p>

double-backticks1

Text with `backticked code with two non-consecutive backticks ` ` are `
handled as two consecutive spans of inline code.

Rendered HTML

<p>Text with <code>backticked code with two non-consecutive backticks</code> <code>are</code>
handled as two consecutive spans of inline code.
</p>

double-backticks2

To place a verbatim backtick within backticks, start and
end `` the inline code span with two backticks and a blank; then use ` ``

Rendered HTML

<p>To place a verbatim backtick within backticks, start and
end <code>the inline code span with two backticks and a blank; then use `</code>
</p>

underscore-in-backticks0

Underscore chars within backticks (`like _these_ ones`) aren't treated
as markdown syntax

Rendered HTML

<p>Underscore chars within backticks (<code>like &#95;these&#95; ones</code>) aren't treated
as markdown syntax
</p>

hard-break0

This line is ended with (invisible) double space after the comma,  
which will make markdown put a `<br>` tag before this next line.

Rendered HTML

<p>This line is ended with (invisible) double space after the comma,<br>
which will make markdown put a <code>&#60;br&#62;</code> tag before this next line.
</p>

hard-break1

- Hard breaks are also inserted  
  when list item lines end in  
  double spaces

Rendered HTML

<ul><li><p>Hard breaks are also inserted<br>
  when list item lines end in<br>
  double spaces
</p></li></ul>

hard-break2

Hard breaks are also inserted on the last (or only) line ending in double-space  

Rendered HTML

<p>Hard breaks are also inserted on the last (or only) line ending in double-space<br>
</p>