pandoc-starter
pandoc-starter copied to clipboard
Adding xelatex support for tufte-handout
Changes to enable xelatex for the tufte handout (see here for discussion of the the changes to template.tex). Tested w/ TexLive 2017 on MacOS Sierra.
Thanks for working on this! xelatex support for the tufte-handout has been something I've always had trouble getting to work.
I checked out your branch and tried building the sample PDF. In particular, I added a bunch of extra paragraphs so that the PDF would be two pages long. Notice this text in the top corner:

This text is supposed to be uppercase:

Can you figure out how to do this with xelatex? This is how I usually do it in my other projects, but using pdflatex:
diff --git a/tufte-handout/src/sample.md b/tufte-handout/src/sample.md
index 60e9af7..98cde2b 100644
--- a/tufte-handout/src/sample.md
+++ b/tufte-handout/src/sample.md
@@ -5,8 +5,9 @@ author: Jake Zimmerman
date: \today
fontsize: 12pt
# Comment or change these if you don't have these fonts installed
-mainfont: Palatino
-monofont: Menlo
+fontfamily: mathpazo
+fontfamilyoptions:
+- sc
newtxmathoptions:
- cmintegrals
- cmbraces
(mathpazo
is the pdflatex
package that has Palatino installed, and the sc
stands for small caps, which is what the capitalized header text uses.)
I'm also happy to just commit the above diff instead of xelatex if that would solve the immediate problem you're running into (mainfont
and monofont
are xelatex
options, so it doesn't make sense to mismatch them with the pdflatex
engine).
If i try to make a multipage pdf with xelatex i get the following error: What does it mean?
Error producing PDF.
! Argument of \MakeTextLowercase has an extra }.
<inserted text>
\par
l.233 s
In this tex.sx
answer, egreg gives a work-around for this bug, after briefly mentioning its origin in the tufte-common.def
file