![]() ![]() With these tools, or similar, and some light UNIX scripting, you can make your own customized slide created pipeline, optimized to your needs and preferences. Beamer to convert the Pandoc output to a PDF slide-deckĪll combined with a little bit of duct-tape, in the form of a UNIX shell script, to produce slide-deck creation software.Pandoc to convert the Markdown to LaTeX while interpolating the raw_attribute bits. ![]() Jupyter's "nbconvert" to convert the notebook to Markdown.LaTeX raw_attribute bits inside Jupyter Notebook's Markdown cells.Through a series of conversion steps, I was able to hide the parts I wanted to hide by using: Putting those two pieces together, I can generate LaTeX from the notebook. The -listings makes pandoc use LaTeX's listings package, which makes code look much prettier. This means if I run pandoc on the Markdown export from a notebook that includes raw_attribute LaTeX bits, I can have as much control over the LaTeX as I want: $ pandoc -listings -o build /presentation.tex build /presentation.md Its raw_attribute extension allows including "raw" bits of the target format in the Markdown. Thankfully, one Markdown implementation– Pandoc Markdown-has a feature that lets me do what I want. Plus, I already have my favorite presentation-creation tool: Beamer.īut Beamer requires custom LaTeX, and that is not usually generated when you convert Markdown to LaTeX. There are ways to convert Markdown to slides-but I have no idea how to use any of them and even less desire to learn. Then I convert my Notebook to Markdown with: $ jupyter nbconvert presentation.ipynb -to markdown -TagRemovePreprocessor.remove_cell_tags= '' -output build /presentation.md Code snippets go into their own blocks, as you would expect.īecause you can add a "tag" to cells, I tag any cell that has "boring" code as no_markdown. I write out my presentation using separate Markdown sections for the text I want to show on the slides and for the speaker notes. I begin my presentations by using Markdown and code blocks in a Jupyter Notebook, just like I would for anything else in JupyterLab. Using Jupyter Notebooks for presentations Even better, I don't want to have slides on one handout and a separate GitHub repository for the source code.Īs is often the case, to solve this issue, I found myself reaching for JupyterLab and its notebook management capabilities. So I want to generate a beautiful handout containing all of my notes and the slides from the same source. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |