A Tufte-like Book with Quarto
Preface
Quarto is powerful tool to render textbook-like content simultaneously in HTML and PDF. I don’t want to compromise on being able to produce a Tufte-like PDF and this project aims to do that with minimal changes to the default Quarto book templates. This is the third attempt at getting the PDF to work.
First, I tried the Tufte-Quarto template by Fred Guth but that was ultimately more customised than I needed, at the apparent cost of introducing some issues.
Second, I tried removing environments defined in LaTeX macros in tufte-common.def
that clashed with Quarto’s own constructs (e.g. marginnote
). I also removed the redefinition of the standard LaTeX environments that caused incomprehensible failures to compile. In this case, I also had to use the symmetric
option, without which Quarto’s marginalia go off the left-hand side of pages that would be on the left-hand side of a printed book.
Here (i.e., the third attempt), I use Quarto to render to LaTeX, then remove some stuff (really just using sed
to comment out some lines) in the LaTeX preamble that appear to prevent the LaTeX from compiling. This preserves more of the Tufte-LaTeX template behaviour, though some (e.g. section numbering) is probably still being overwritten by Quarto defaults.
The PDF corresponding to this HTML is available here.
The main resources used for this project are
- the
tufte-book
LaTeX class, - Tufte CSS, and
- the example Tufte handout in the Quarto gallery (HTML, PDF, source).
Just to make sure there’s a reference somewhere, see Knuth (1984) for additional discussion of literate programming.
The remainder of the book demonstrates some features from the Tufte style and the potential of Quarto.