MultiMarkdown test document
As any Markdown user knows or should know, beside the CommonMark initiative and specification, there’s nothing really “standard” with Markdown syntax, only “vastly agreed upon” practices. As long as you don’t stray too far away from this “common practice”, you shouldn’t run into issues. This document, unless explicitly mentioned, strives to stay within these limits.
Credit — In this document, I’m using “Modern” lorem ipsum generated by Star Trek Ipsum Generator. Zhese are the lengthy italicized passages. Note that the apostrophes are not necessarily correct, typographically ! Nor are the “two dashes”.
Obviously, we just tested a horizontal rule. A little tip : if you stick with dashes (“three or more”), you’ll be good anywhere. (Wink towards Ulysses.)
Alt-F4 = Exit
Merke!!!
Line length
90 contiguous digits :
123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
According to the classic rule, if you have readability in mind, your line length should be “around two and a half alphabet and not more than three and a half”. So, here we go :
2 alphabets :
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
2 ½ alphabets :
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklm
3 alphabets :
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
3 alphabets, with capitals :
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
3 ½ alphabets :
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklm
4 alphabets :
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
Now, you can evaluate the line length of your style sheet.
By any means, if you’re a writer, take the time to also set it properly in your editor of choice.
NB : for writing, I think one can go as far as three and a half alphabets. But four is definitely too long if you’re writing prose, not code.
Let's continue by testing headings and subheadings, paying a special attention to their vertical spacing. Header level 1 has already been used, at the top of this document. But anyway, we have to assess how it works when it is being followed immediately by a level 2 heading. I begin by putting a separator, because H1 is not meant to be in the middle of a text.
Header 1
Header 2
When a child is taught, it's programmed with simple instructions, and at some point, if its mind develops properly, it exceeds the sum of what it was taught, thinks independently. Compassion: that's the one things no machine ever had. Maybe it's the one thing that keeps men ahead of them. I'm Givin' Her All She's Got, Captain! It’s a — far, far better thing I do than I have ever done before; a far better resting place I go to than I have ever known.” “…Is that a poem?” “…Mmm. Something Spock was trying to tell me — on my birthday.
Header 3
It's not safe out here. It's wondrous, with treasures to satiate desires both subtle and gross; but it's not for the timid. If we're going to be damned, let's be damned for what we really are. A library serves no purpose unless someone is using it. The intellect is not all... but its cultivation must come first, or the individual makes errors... wastes time in unprofitable pursuits. Make It So!
Header 4
Humans do have an amazing capacity for believing what they choose -- and excluding that which is painful. You know the greatest danger facing us is ourselves, and irrational fear of the unknown. There is no such thing as the unknown. Only things temporarily hidden, temporarily not understood.
Header 5
Madness has no purpose. Or reason. But it may have a goal. To all mankind -- may we never find space so vast, planets so cold, heart and mind so empty that we cannot fill them with love and warmth. Make It So! To Boldly Go Where No Man Has Gone Before... It was the best of times, it was the worst of times.’ …Message, Spock?” “…None that I am conscious of — save, perhaps, for ‘Happy Birthday.‘
Header 6
A man either lives life as it happens to him, meets it head-on and licks it, or he turns his back on it and starts to wither away. Compassion: that's the one things no machine ever had. Maybe it's the one thing that keeps men ahead of them. Change is the essential process of all existence. We prefer to help ourselves. We make mistakes, but we're human -- and maybe that's the word that best explains us. When the personality of a human is involved, exact predictions are hazardous. I object to intellect without discipline; I object to power without constructive purpose. So much for the little training cruise.
“Emphasis” and “Strong”
They’ve already been used abundantly in this document. Nevertheless, for indexing and completeness, here they are again.
Emphasis: example For most people, myself included, “emphasis” is, mentally, “italics”. And in most editors, there exists indeed the shortcut Cmd–I
or Ctrl-I
.
Strong: example For most people, “strong” is, mentally, “bold”. Hence the common shortcut Cmd-B
or Ctrl-B
.
Strong + emphasis: example Yes, it’s bold italics.
URLs
We’ve already mentioned some URLs. But anyway, here are some more :
- http://devontechnologies.com — a “direct” link.
- GitHub’s Markdown guide — inline-style reference
- Adam Pritchard’s Markdown Cheat Sheet — reference-style link
Numbered lists, multilevel
- Ordered list item
- Second level of the list
- Second level of the list. Change is the essential process of all existence. Insults are effective only where emotion is present.
- Why not a third level ? Sometimes it’s handy.
- Still the same level (three).
- And a fourth one ? It should be typographically correct.
- But frankly, you shouldn’t write four levels of a list. Your reader might get lost !
- Ordered list item. We’re back at level 2. We need a long paragraph in order to evaluate the indentation. They used to say that if Man was meant to fly, he'd have wings. But he did fly. He discovered he had to. We're a most promising species, Mr. Spock, as predators go. Did you know that? I frequently have my doubts. I don't. Not any more. And maybe in a thousand years or so, we'll be able to prove it. You know the greatest danger facing us is ourselves, and irrational fear of the unknown. There is no such thing as the unknown. Only things temporarily hidden, temporarily not understood. I object to intellect without discipline; I object to power without constructive purpose. …Warp speed.
- Further ordered list item. We’re back at level one. Perhaps man wasn't meant for paradise. Maybe he was meant to claw, to scratch all the way. When a child is taught, it's programmed with simple instructions, and at some point, if its mind develops properly, it exceeds the sum of what it was taught, thinks independently.
- The last item of the list.
Bulleted lists
- Bulleted list item.
- A second level. As before, we’ll put some more text in order to verify the indentation of the paragraphs.
- Third level. Insufficient facts always invite danger. I’ve done far worse than kill you. …I’ve hurt you; and I intend to go on… hurting you. I will leave you as you left me; as you left her. Marooned for all eternity at the center of a dead planet.
- A second level. As before, we’ll put some more text in order to verify the indentation of the paragraphs.
- Bulleted list item at the first level.
- Now an item at the second level.
- Third level.
- Next item is also at the third level.
- Fouth level. You really want to go so deep ? Really, in all truth, you shouldn’t. You’d better structure you text — and maybe your thought — otherwise. But anyway…
- Here you go with the fourth level.
- Did you realise we’ve come back to level three ? You see the problem with too deep a hierarchy…
- Better use a mind map, no ? (This is level two, by the way. Does your stylesheet render levels at least visible ?)
- Now an item at the second level.
- Bulleted list item. The third one at level one.
Intermixed lists
- First level is numbered.
- Second level is bulleted.
- Another second level item.
- Back to first level
- Second level. Numbered ? It can be. But you’ve better not do such confusing things. If your rendering engine is not confused, it’s a good point for it !
- And a third level. With bullets, this one. Still with us ? Veeery good !
- If you have bullets, correctly, at this level, you can be satisfied.
- Second level, following. Logic is the beginning of wisdom, not the end. They used to say that if Man was meant to fly, he'd have wings. But he did fly. He discovered he had to.
- Second level. Numbered ? It can be. But you’ve better not do such confusing things. If your rendering engine is not confused, it’s a good point for it !
- First level, third point.
So far, we’ve seen isolated lists. In fact, they were directly following a heading 3. Let’s see how they are rendered when in the middle of paragraphs of running text, as it’s commonly the case.
- The most common case is the bulleted list.
- It can be an enumeration of ideas.
- With a few sub-ideas.
- Another relevant idea.
- And back to the first level.
Is this list visually satisfying ? It should be reasonably compact, but still with some nice vertical spacing in order to help you see the grouping of your ideas and points.
Images
For example, the Markdown logo , inside the paragraph.
The next three images have a caption with them. But not every style sheet will display it.
Here’s a picture from the Lorem Picsum website :
Now, a square one. Again, intentionally large (2'000 × 2'000 pixels), so you can assert if your preview is OK with this kind of pictures.
Footnotes
Not part of the cardinal, original John Gruber’s Markdown definition, footnotes are very useful, thus widely available.1 I’ve just written a footnote.
Did you know that there also exists a very simple syntax ? ^[Footnote in its simplest form.] — It doesn’t work everywhere, but when it does, it’s very handy !
We will now explore the rendering of a longer, multi-paragraph footnote.2 I’ve just entered the callout and I keep writing the body text paragraph.
→ For good measure,3 here’s a final — maybe — footnote.
Blockquotes
Technically, it’s a“blockquote”. But practically, it’s the citation of someone.
Life is like riding a bicycle. To keep your balance, you must keep moving.
— Albert Einstein
This is another example of a quoted paragraph. It stays indented over multiple lines up to the paragraph mark character.
In order to separate this quote from the previous one, I had to enter a separate paragraph with just a space. There’s a trick : type the HTML code for an “em space” :
So, while editing, you’ll see it and respect it.
NB : a Typinator macro is handy !This is an example of a quoted quoted paragraph. It stays double indented over multiple lines up to the paragraph mark character.
Rien ne sert de courir, il faut partir à point. — I hope you don’t mind some French, do you ?
Tables
Tables are NOT part of the CommonMark specification. But nevertheless, they are widely available in different editors (Typora, Zettlr, Obsidian) and rendered correctly by Marked, DEVONthink, Byword,… — in fact, by any MultiMarkdown renderer. As they are very useful, I wouldn’t advise against their use. But allow me just two tips :
- Avoid “TAB” characters to align columns, because some implementations don’t like them. Use “SPACE” characters instead.
- Put a “PIPE” (
|
) character at the end of the lines (rows) ; some implementations require them (Typora, for example).
Colors | Property 1 | Property 2 |
---|---|---|
Red | Stop! | Warm |
Orange | Alert! | Just between yellow and red |
Yellow | Can mark text. Generally not very readable… |
unless set against a sufficiently dark background. |
Green | Go! | Ecological |
[The title of the table]
Unfortunately, not every implementation renders the table title. Anyway, this title syntax is a good idea from Fletcher Penney, MultiMarkdown’s author and ideator.
Now for a table with a long text in the header, so as to evaluate the vertical alignment of the text.
Short header | Long header. Let’s make it really long. Really, really long. And if it’s not enough to fill the cell… let’s force a new line ! |
---|---|
A normal column. | As you know, there’s (yet) no way to set the width of the columns in Markdown. |
Maybe… | …one day… there will be a way to balance columns. Until then, it’s 🤞 with the rendering. |
Maybe you might be interested in evaluating how similar characters are rendered in the particular font you’ve selected for your editor or for your preview. So, here’s a table with often ambiguous glyphs :
Char. | Description |
---|---|
i | idea |
I | India |
1 | one |
l | light |
L | Lima |
o | open |
O | Oscar |
0 | zero |
j | just |
J | Juliett |
S | Sierra |
5 | five |
0O | zero, Oscar |
l1 | light, one |
lI | light, India |
Il | India, light |
il | idea, light |
IL | India, Lima |
I1 | India, one |
1l | one, light |
71 | seven, one |
vy | voyel, yes |
Z2 | Zulu, two |
S5 | Sierra, five |
G6 | Golf, six |
B8 | Bravo, eight |
A little trick
One missing feature of Markdown is the ability to horizontally center text. But we can take advantage of the possibility to include some HTML in our writing. So, it can be done like this :
This is a horizontally centered line.
This one too is centered.
Code and verbatim
You’ve already seen, earlier in this file, some verbatim
, i.e. text enclosed inside of backticks ( ` ). Mainly for programmers, Markdown also allows code blocks. They are generally rendered with syntax highlighting. Let’s illustrate this with the HTML for centering a line :
<p style="text-align: center">
This is a horizontally centered line.<br />This one too is centered.
</p>
Some non-standard but useful specialities
This syntax for checkboxes is “quasi standard” :
- checkbox (= “to do”)
- ticked checkbox (= “done”)
On some implementations, they are even interactive in the preview.
These next four syntaxes are not standard, but they sometimes provide interesting possibilities.
==between double “equal signs”==
between double “tildes”
- ~between single “tildes”~
-
:between double “colons”::
Some implementations provide the commodity of indices and exponents :
→ H~2~O
→ E = M C^2^
That’s all folks !
Lausanne, Switzerland — October 11, 2020.