ExamplesΒΆ
Consider the following simple markdown file, sample.md.
# Sample Markdown
## Get excited!
```python {cmd id="_itscode"}
x = 2
print(x +3)
```
We can tangle out the code with the following command.
prosecode tangle sample.md
This will produce a file called itscode.py that looks as follows.
x = 2
print(x +3)
Then, we can weave the code into proper LaTeX as follows.
prosecode weave sample.md
This produces the file sample.tex.
\chapter{Sample Markdown}
\section{Get excited!}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n}{x} \PY{o}{=} \PY{l+m+mi}{2}
\PY{n+nb}{print}\PY{p}{(}\PY{n}{x} \PY{o}{+}\PY{l+m+mi}{3}\PY{p}{)}
\end{Verbatim}