Live Cycle
Basic description
When you run: latextomd input.tex - o output.tex
:
- Pre-Pandoc processing: process enumerate, process tikz/pstricks, ...
- Convert with pandoc to markdown
- Post-Pandoc processing: process math mode, ...
Pre-Pandoc
A class of LatexToMd
is instentiate whith the content
of input.tex
.
_remove_comments
_replace_simple
Process basics replacements without regex. See config.replace_simple
. For example:
_strip_lines
strip all lines.
_process_preamble
Split the content
whith preamble
.
Default preamble is \documentclass{article}
.
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{enumerate}
\item One
\item Two
\end{enumerate}
\end{document}
_convert_enumerate
1. Resolve \(x^2=4\)
2. Resolve \(x^2=-2\)
1. Let \(f: x \mapsto \ln(x)-x\)
1.a) Calculate \(f'(x)\)
1.b) Calculate \(\displaystyle\lim_{x\to +\infty}f(x)\)
2. Sketch the graph
Tip
You can let pandoc
handle the enumerate environnements whith the flag --pandoc-enumerate
Example
With:
-
Resolve \(x^2=4\)
-
Resolve \(x^2=-2\)
-
Let \(f: x \mapsto \ln(x)-x\)
-
Calculate \(f'(x)\)
-
Calculate \(\displaystyle\lim_{x\to +\infty}f(x)\)
-
-
Sketch the graph