tarleb

Computer and Information SciencesQuarto
tarleb's blog
Home PageRSS Feed
language

Typst Musings

Published
Author Albert Krewinkel

Typst, the new writing tool, was open sourced a couple of days ago. This is right up my alley of course, and I have a couple of thoughts on it, which I share here. What is it? Typst is a writing tool that’s described as a LaTeX alternative: it takes plain-text markup as input and can produce nice looking PDFs from that.

Auto-numbered list continuations

Published
Author Albert Krewinkel

Pandoc’s Markdown allows for “fancy lists”, i.e., lists with different styles used for the marker of ordered list items. E.g., the list (I) primus (#) secundus (#) tertius uses uppercase roman numerals and double parentheses for the markers.

Semantic line breaks

Published
Author Albert Krewinkel

Line breaks usually have no semantic meaning within a Markdown paragraph. However, using line breaks to mark the end of a sentece can help with productivity for various reasons.1 Documents with one sentence per line are also called “ventilated prose”, and the Write the {Ascii}Docs website has a good article on that topic.

Document font

Published
Author 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.

Haskell usedata objects

Published
Author 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.

Install pandoc in custom Docker images

Published
Author Albert Krewinkel

When pandoc is used in larger pipelines, e.g. in combination with Sphinx, it can be useful to pack everything up into one neat container. One option is to base the container on a pandoc image like pandoc/core, but this may be difficult due to other dependencies.

Generating a sitemap with Quarto

Published
Author Albert Krewinkel

Sitemaps are an easy way to list all pages that a search engine should crawl and index. Quarto supports the standard, XML based Sitemap Protocol, although that fact is a bit hidden in the docs.

Pandoc resources

Published
Author 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.

Quarto Website with GitHub Actions

Published
Author Albert Krewinkel

Quarto makes it very easy to publish a website via GitHub Pages: It is as simple as running quarto publish gh-pages. Here we explore a slightly different method that uses a GitHub Action to publish the website automatically every time it is updated. Classic GitHub Pages The classic way to publish a website via GitHub pages is to maintain a separate branch gh-pages.

Santa’s Little Lua Scripts

Published
Author Albert Krewinkel

Santa sighted deeply as worry and uncertainty gave way, leaving a feeling of relieve and accomplishment. The year was one of the worst he’d seen so far. Large numbers of his helpers were moving from the North Pole to Antarctica to satisfy their ambient temperature preferences. There would be many telecommuting Elves this year, and each helper enjoyed additional autonomy. Tying everything together was a challenge.

0