Monday, August 02, 2021

[mptdbtrq] 2020\.  What a year.

in the documentation for Markdown, the canonical example of a paragraph that begins with just a number as a sentence is:

1986. What a season.

the paragraph likely refers to all the drama of the 1986 baseball season, culminating in the World Series between the Mets and the then-still-cursed Red Sox.

the paragraph is difficult to typeset in Markdown because an initial number and period normally gets transformed into a numbered list <ol> with the initial number discarded and replaced with 1.  here is an updated example of such a paragraph:

2020.  What a year.

to typeset this in Markdown, the trick is to backslash-escape the period following the number.  this is not easy to remember.

2020\. What a year.

2020\.\  What a year.

in the second line, we have also backslash-escaped the first (of two) spaces after the period to render two spaces after the period.  the multiple backslashes strain the claim that unrendered Markdown is readable.

(backslash-space does not work in Github-flavored Markdown.)

writing about Markdown with Markdown gets even more ridiculous.

i was unable to figure out pure Markdown that results in the following HTML, used above.  with pandoc, backslash-space stops becoming nbsp inside backquotes (code block).  (the text above was achieved by manually editing the raw HTML after rendering.)

<p><code>2020\.\&nbsp; What a year.</code></p>

forgetting about the outer code block for now, we get exponential backslashes when writing about writing.

2020\\.\\\  What a year.

2020\\\\.\\\\\\\  What a year.

No comments :