pandoc-starter icon indicating copy to clipboard operation
pandoc-starter copied to clipboard

Adding xelatex support for tufte-handout

Open mkirchner opened this issue 6 years ago • 4 comments

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.

mkirchner avatar Mar 12 '18 07:03 mkirchner

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:

screen shot 2018-03-31 at 3 33 33 pm

This text is supposed to be uppercase:

screen shot 2018-03-31 at 3 39 20 pm

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.)

jez avatar Mar 31 '18 22:03 jez

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).

jez avatar Mar 31 '18 22:03 jez

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

faebser avatar May 15 '18 14:05 faebser

In this tex.sx answer, egreg gives a work-around for this bug, after briefly mentioning its origin in the tufte-common.def file

fgrosshans avatar Jan 08 '19 14:01 fgrosshans