Skip to contents

R Markdown output format for the city of Zurich corporate design. A thin wrapper around indiedown_pdf_document_with_asset() that fixes the syntax highlighting style and the LaTeX engine (xelatex, required for the bundled fonts).

Usage

zueridown(...)

Arguments

...

Passed on to indiedown_pdf_document_with_asset() and, in turn, to rmarkdown::pdf_document().

Value

An R Markdown output format object.

Details

The main font is Helvetica Neue LT Pro, the font of the corporate design, if it is installed: 65 Medium as regular and 85 Heavy as bold. The font is licensed and does not ship with the package. It is found if it is installed for the current user or for all users. Users who cannot install fonts can copy the font files, named like HelveticaNeueLTPro-Md.otf or .ttf, to a folder and set the option zueridown.font_path to that folder, e.g. in .Rprofile. The font files are loaded by path, with their folder in the fontspec option Path=, which cannot escape some characters: a folder with , = % # { } [ ] " or : in its path, except for the : of a Windows drive letter, such as OneDrive - Acme, Inc (with ,), is not supported, and the render stops with an error that names the folder if a font is loaded from it. This applies to the folder of the option, to the folder of the fonts installed for the current user on Windows, and to the folder where the package is installed, which holds TeX Gyre Heros. The path of the package folder must also not contain # or : , which stops every render. If the font is not found, the main font is TeX Gyre Heros, a Helvetica clone that ships with the package and is loaded by file name from its installation directory, and a message explains how to make the font available. The message is shown at the start and at the end of the render, and again in the same R session only if its advice changes. Any mainfontoptions set in the document are appended to the options of Helvetica Neue LT Pro or TeX Gyre Heros.

A document can use another font by setting mainfont in its YAML header, a user by setting the option zueridown.mainfont, e.g. in .Rprofile. The font can be the name of an installed font, which is looked up like Helvetica Neue LT Pro, or the file name of a font, with its folder as Path= in mainfontoptions, relative to the folder of the document. Give a font file by its name only, and put it in the folder of the document or in the TeX installation: it is not looked up in the folder of the option zueridown.font_path. The mainfontoptions set in the document are the options of this font. If the font is not found, Helvetica Neue LT Pro or TeX Gyre Heros is used instead, without these options, and a message explains why. The font is used as named, unchecked, if the mainfontoptions set Path=, if it is a font file, which LaTeX looks up itself, or if it is not found as font files and fc-list is not available. The same holds with Extension= in mainfontoptions. If a face that the mainfontoptions name is a font file, the font is used as named if its other faces are found by name, or if the lookup cannot tell, e.g. without fc-list. With a font file, or with Extension=, fontspec loads the faces that mainfontoptions name, such as BoldFont=*-Bold, as font files with the same extension. A main font named with a folder is not found, unless Path= is set: give its folder as Path= instead.