Informática y Ciencias de la InformaciónInglésQuarto

tarleb

tarleb's blog
Página de inicioFeed RSS
language
PDFInformática y Ciencias de la InformaciónInglés
Publicado
Autor 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.

MarkdownPandocFilterInformática y Ciencias de la InformaciónInglés
Publicado
Autor 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. It gets rendered as Continuations The fancy lists feature also allows to continue lists after an intermediate paragraph: i. one #. another Interruption; not part of any list. iii.

MarkdownPandocInformática y Ciencias de la InformaciónInglés
Publicado
Autor 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.

PandocTipDockerInformática y Ciencias de la InformaciónInglés
Publicado
Autor 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.

HaskellLuaPandocQuartoInformática y Ciencias de la InformaciónInglés
Publicado
Autor 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.

PandocTipPDFHTMLInformática y Ciencias de la InformaciónInglés
Publicado
Autor 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.

QuartoInformática y Ciencias de la InformaciónInglés
Publicado
Autor 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. Quarto will automatically produce a sitemap if the website’s URL is given as site-url property: website: title: tarleb site-url: 'https://tarleb.com' site-path: '/' The URL will contain a colon :, which is why the YAML value must be put in quotes.

PandocInformática y Ciencias de la InformaciónInglés
Publicado
Autor 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;

QuartoInformática y Ciencias de la InformaciónInglés
Publicado
Autor 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.

LuaHsluaExampleInformática y Ciencias de la InformaciónInglés
Publicado
Autor 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.

PandocLuaPdfInformática y Ciencias de la InformaciónInglés
Publicado
Autor 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;