2

I'm trying to get Bookdown, Tufte style, to output to PDF with similiar aesthetics to the "Envisioned" style. I've been able to change fonts by using "includes" in the YAML data, and linking to a .tex file.

Now I would like to remove the Italics from the PDF output. (The equivalent to toggling the "italics" feature off in the HTML output).

Any help on this would really be welcome.

This is .tex file:

\usepackage{xcolor}
\pagecolor{white}
\setmainfont{Roboto Condensed}
\setsansfont{Roboto Condensed}

The outcome I'm trying to produce is equivalent to the following line in the HTML YAML data:

tufte_features: ["fonts", "background"]

where Italics is missing and therefore switched off.

I'm a newbie who really likes the Tufte style sidenotes, so please forgive my silly question if there is something simple I have missed.

Thanks!

Yihui Xie
  • 28,913
  • 23
  • 193
  • 419
irshaadv
  • 21
  • 1
  • 2

1 Answers1

0

The bookdown tufte package relies on the latex \maketitle, which you can alter using a latex package titling. So, for example, you can remove italics and replace with a bold font and flush left the title by including a bit of latex code in the yaml:

---
title: "Tufte Handout"
header-includes:
  - \usepackage{titling}
  - \pretitle{\begin{flushleft}\LARGE\bfseries} 
  - \posttitle{\par\end{flushleft}}
output:
  bookdown::tufte_handout2
---

You can also change the section formatting using the yaml. For example,

  - \titleformat*{\section}{\Large\bfseries\sffamily}
  - \titleformat*{\subsection}{\large\bfseries\sffamily}

Large and large changes the font sizes, bfseries sets the font to bold face, and sffamily changes the font to san serif.

ssp3nc3r
  • 3,662
  • 2
  • 13
  • 23