Module render

Source
Expand description

The LaTeX renderer. This is quite low level, and you probably don’t want to use this. Instead, use LatexObj, which contains a better, more high-level way to handle LaTeX in your presentation.


§The rendereing process:

  1. Collect all LaTeX expressions into a file, saved in /tmp/ytesrev/tmp.tex
  2. Run pdflatex on the file
  3. Run pdfcrop on to make all expressions the right size
  4. Run pdftoppm on the resulting .pdf-files to generate .png-files of all the expressions
  5. (Done for each LatexObj) Load the .png-file into a PngImage

Structs§

LatexIdx
An index given to each LatexObj, as they are all rendered in the same document The only way to obtain an index is to register an equation using register_equation, and as such, an invalid index should be impossible to obtain.

Enums§

LatexError
An error that might occur when rendering LaTeX expressions

Functions§

add_prelude
Add prelude to the LaTeX render.
read_image
Reads an image from an LatexIdx.
register_equation
Register an equation to be rendered. To render, use the render_all_equations method.
render_all_equations
Run the rendering process. This takes a few seconds.