DocOnce can recognize basic Markdown as input in the .do.txt
file
and transform such text to native DocOnce.
(hpl 1: This is a special comment on text that is rendered by extended Markdown versions.)
(comment 2: This is another version of the special comment on text; this one without any author name and colon in the beginning.)
Markdown has boldface and emphasize typesetting, as well
as inline verbatim computer code
.
Paragraph headings. These are written using standard Markdown boldface syntax.
The Markdown headings can only be of three types: section, subsection, and subsubsection.
Here is a plain code snippet without language specification:
file=$1 if [ -f $file ]; then cp $file $file.cop fi # This is Bash - what happens to this comment?
The same snippet typeset explicitly as Bash, but with a common indentation to be removed:
file=$1
if [ -f $file ]; then
cp $file $file.cop
fi
# This is Bash - what happens to this comment?
And here is Python:
from math import sin
def f(x):
return x*sin(x)
x = 1.4
print(f(x))
And HTML:
<h1>Some heading</h1>
# And a comment
Markdown also features quoted paragraphs that start with a greater than sign, either just in the beginning or at every line.
If a quoted paragraph with blank lines is desired, you
must use >
on the beginning of every line.
NOTE:
This quoted paragragraph is a simulation of a primitive admon in Markdown.
Markdown applies the dash in itemized lists:
Let us test this in a quoted environment too:
List:
Enumerated lists go as follows.
Markdown Extra has a special syntax for tables:
Item | Value | Qty |
---|---|---|
Computer | 1600 USD | 5 |
Phone | 12 USD | 12 |
Pipe | 1 USD | 234 |
You can render LaTeX mathematical expressions using MathJax, as on math.stackexchange.com:
The Gamma function satisfying \( \Gamma(n) = (n-1)!\quad\forall n\in\mathbb N \) is via the Euler integral
$$ \Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,. $$