Messaggi di Rogue Scholar

language
Pubblicato in tarleb
Autore Albert Krewinkel

When extending pandoc (or Quarto) with Lua filters, we interact with so-called Lua userdata objects. These objects are used to wrap document AST elements, making them accessible from Lua scripts. They mostly behave like normal Lua tables. This post is intended as a quick overview, listing interesting properties of userdata objects.

Pubblicato in tarleb
Autore Albert Krewinkel

Setting the document font this way works for ConTeXt, LaTeX, and HTML output. The fonts used in docx or odt output must be controlled with the reference document instead. The default LaTeX engine is pdflatex, which only supports TeX’s own font format and cannot use the TrueType or OpenType fonts installed on the system. However, XeLaTeX was written with that in mind; switching to that engine allows to specify any font available on the system.

Pubblicato in tarleb
Autore Albert Krewinkel

Setting the document font this way works for ConTeXt, LaTeX, and HTML output. The fonts used in docx or odt output must be controlled with the reference document instead. The default LaTeX engine is pdflatex, which only supports TeX’s own font format and cannot use the TrueType or OpenType fonts installed on the system. However, XeLaTeX was written with that in mind; switching to that engine allows to specify any font available on the system.

Pubblicato in tarleb
Autore Albert Krewinkel

When extending pandoc (or Quarto) with Lua filters, we interact with so-called Lua userdata objects. These objects are used to wrap document AST elements, making them accessible from Lua scripts. They mostly behave like normal Lua tables. This post is intended as a quick overview, listing interesting properties of userdata objects.

Pubblicato in tarleb
Autore Albert Krewinkel

These are the resources that I’d want to have if I was to learn about pandoc (the universal document converter) all over again: Installing latest release The GitHub release page has installers for Windows, macOS, and Linux. Docker images There are three types of pandoc Docker images: minimal – very small, just the bare pandoc binary; core – includes pandoc-crossref and helpers programs, e.g. those used by pandoc for SVG image conversion;

Pubblicato in tarleb
Autore Albert Krewinkel

These are the resources that I’d want to have if I was to learn about pandoc (the universal document converter) all over again: Installing latest release The GitHub release page has installers for Windows, macOS, and Linux. Docker images There are three types of pandoc Docker images: minimal – very small, just the bare pandoc binary; core – includes pandoc-crossref and helpers programs, e.g. those used by pandoc for SVG image conversion;

Pubblicato in tarleb
Autore Albert Krewinkel

A question came up on the Lua mailing list, asking whether there was a PDF version of the Lua manual. This is, of course, the home domain of pandoc, and I got nerd-sniped into producing a PDF (and ePUB) version of the manual. This is a good opportunity to showcase some pandoc features. The post describes the process of going from an HTML web page to a PDF file via LaTeX and pandoc. We will see how to quickly convert documents with pandoc;