Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jupyter Python Markdown: Evaluated Inline code in LaTeX output

Python Markdown is a very nice extension for the jupyter notebook, which is in turn great for literate programming, i.e. mixing text and code.

Python Markdown makes it possible to include short inline code in Markdown cells in Jupyter like in the following example:

Python cell: a = 3.1415

Markdown cell: The value of a was {{a}}.

Everything works fine in the browser interface, but when I export it to LaTeX (or PDF via LaTeX), the output will still contain {{a}} as an unevaluated expression.
It would of course be really helpful to have the evaluated expression in the output for generating reports.

like image 481
NicolasBourbaki Avatar asked Oct 17 '25 16:10

NicolasBourbaki


1 Answers

The solution was actually rather trivial:

When enabling a certain option on the command line, this will create an entry in the web interface irrespective of this option actually exists.
I had mispelled Python Markdown with python-markdown and ended up with this second entry in the web interface.
Enabling the first entry fixed the problem.
The second entry could be savely removed.

like image 68
NicolasBourbaki Avatar answered Oct 20 '25 04:10

NicolasBourbaki



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!