Open andrewufrank opened 1 year ago
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.
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.
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.