tufte-latex icon indicating copy to clipboard operation
tufte-latex copied to clipboard

the current version (dated sept 10, 2019) does not compile with lualatex

Open andrewufrank opened this issue 1 year ago • 2 comments

works ok with pdflatex

the patch I is based on a recommendation in https://tex.stackexchange.com/questions/689754/code-produces-error-with-lualatex-but-not-with-pdflatex-why?noredirect=1#comment1711437_689754

unfortunately I have not gotten any information how it works but it makes sample-book.tex and sample-handout.text to compile and produce a pdf which looks ok.

andrewufrank avatar Jun 28 '23 06:06 andrewufrank

tufte-book uses for the caps spacing with pdflatex microtype but with lualatex the soul package. And it uses internally \MakeTextUppercase from the textcase package:

\documentclass{tufte-book}
%\soulregister\MakeTextUppercase{1}
\begin{document}
\ShowCommand\allcapsspacing
\allcapsspacing{\MakeTextUppercase{abc}}
\end{document}

gives with pdflatex:

> \allcapsspacing=\long macro:
#1->\textls [200]{#1}.

and with lualatex

> \allcapsspacing =macro:
->\SOUL@sosetup \def \SOUL@preamble {\SOUL@setso {0.15em}{0.65em}{0.6em}\SOUL@sopreamble }\SOUL@ .

As \MakeTextUppercase is not a registered command in soul it errors. One could register the command, or one could replace \MakeTextUppercase by \MakeUppercase (in a current LaTeX they are identical), but much better would be to use with lualatex also microtype or the Letterspace option of fontspec.

u-fischer avatar Jun 29 '23 09:06 u-fischer

FWIW, I've also fixed this problem in my pull request (#176) using the fontspec package, and implemented the fix is directly in tufte-common.def (instead of the the sample files) so hopefully it'll be easier to use in other documents.

chriskgrant avatar Jul 03 '23 19:07 chriskgrant