markdown in latex code example
Example 1: markdown in latex
% In your preamble
\usepackage[inlineFootnotes]{markdown}
% In the main body of your document
\begin{markdown}
Here's a link to [a website](http://foo.bar). And now^[with `markdown` v2.4] you can also use inlined footnotes with `inlineFootnotes`.
\end{markdown}
Example 2: markdown in latex
% In your preamble
\usepackage[smartEllipses]{markdown}
% In the main body of your document
\markdownInput{example.md}
Example 3: markdown in latex
% In your preamble
\usepackage[hashEnumerators]{markdown}
% In the main body of your document
\begin{markdown}
### An h3 header ###
Now a nested list:
1. First, get these ingredients:
* carrots
* celery
* lentils
2. Boil some water.
3. Dump everything in the pot and follow
this algorithm:
find wooden spoon
uncover pot
stir
cover pot
balance wooden spoon precariously on pot handle
wait 10 minutes
goto first step (or shut off burner when done)
Do not bump wooden spoon or it will fall.
\end{markdown}
Example 4: markdown in latex
% In your preamble
\usepackage[fencedCode]{markdown}
% In the main body of your document
~~~~
# Let me re-iterate ...
for i in 1 .. 10 { do-something(i) }
~~~~
Example 5: markdown in latex
% In your preamble
\usepackage[hashEnumerators,smartEllipses]{markdown}
% In the main body of your document
Using inline markdown:
\begin{markdown}
An h1 header
============
Paragraphs are separated by a blank line.
2nd paragraph. *Italic*, **bold**, and `monospace`. Itemized lists
look like:
* this one
* that one
* the other one
> Block quotes are
> written like so.
>
> They can span multiple paragraphs,
> if you like.
An h2 header
------------
Here's a numbered list (use `hashEnumerators` option if you want to use hashes):
#. first item
#. second item
#. third item
\end{markdown}