Weave
Last updated
Last updated
allows to produce dynamic documents where the script that produce the output is embedded directly in the document, with optionally only the output rendered.
Save the document below in a file with extension jmd (e.g. testWeave.jmd)
Here instead I will put in the PDF both the script source code and the output:
Note also that I can refer to variables defined in previous chunks (or "cells", following Jupyter terminology):
```
You can then "compile" the document (from within Julia) with:
using Weave; weave("testWeave.jmd", out_path = :pwd, doctype = "pandoc2pdf")
For a much more complete example see the .
To obtain the :
In Ubuntu Linux (but most likely also in other systems), weave needs pandora and LaTeX (texlive-xetex
) already installed in the system.
If you use Ununtu, the version of pandora in the official repositories is too old. Use instead the deb available in .
While an updated, expanded and revised version of this chapter is available in "Chapter 11 - Utilities" of , this tutorial remains in active development.