Markdown Implementation
Base Implementation
md2pdf uses Python-Markdown/markdown
to convert Markdown to HTML which, apparently, is a Python implementation of John Gruber's markdown
According to the cited program's documentation, the specification is implemented as close to the reference specification as possible. In this link, you will see difference of the Python implementation and the original implementation.
And oh yes, this is an arguably messy implementation of Markdown, as opposed to Commonmark Markdown. But we got to make do of what we have, no? baka baka :3
Extended Syntax
md2pdf extended the base implementation, and hereinunder are the details.
Page Breaks
Page breaks is denoted by the following:
<<<<>>>>
It needs to be separated from the other blocks by at least a single new line (both before and after it) for it to work.
For more information on how whi~nyaan! came up with the idea of page breaks, refer to this link.
Math Expression
KaTeX expressions are supported in this program. You just need to surround it in a code block, with the language set as math
. An example of this is the following:
```math
% \f is defined as #1f(#2) using the macro
\f\relax{x} = \int_{-\infty}^\infty
\f\hat\xi\,e^{2 \pi i \xi x}
\,d\xi
```
This link lists all of the supported functions in KaTeX, grouped logically.