Problems compiling Tufte title page in XeLaTex
It's a bug in the tufte
suite. The minimal example
\documentclass{tufte-book}
\title{this is a title}
\author{me}
\begin{document}
\maketitle
\end{document}
also fails when compiled with latex
, because with latex
and xelatex
there's no possibility of using microtype
for letterspacing, so tufte-common.def
resorts to using soul
features. However, \MakeTextUppercase
fails with this method.
For XeLaTeX a workaround can be found in my answer to XeTeX seems to break headers in Tufte-handout
\documentclass{tufte-book}
\usepackage{ifxetex}
\ifxetex
\newcommand{\textls}[2][5]{%
\begingroup\addfontfeatures{LetterSpace=#1}#2\endgroup
}
\renewcommand{\allcapsspacing}[1]{\textls[15]{#1}}
\renewcommand{\smallcapsspacing}[1]{\textls[10]{#1}}
\renewcommand{\allcaps}[1]{\textls[15]{\MakeTextUppercase{#1}}}
\renewcommand{\smallcaps}[1]{\smallcapsspacing{\scshape\MakeTextLowercase{#1}}}
\renewcommand{\textsc}[1]{\smallcapsspacing{\textsmallcaps{#1}}}
\usepackage{fontspec}
\fi
\title{this is a title}
\author{me}
\begin{document}
\maketitle
\end{document}
Of course you'll have to define font substitutes for the text fonts; the choice
\ifxetex
\newcommand{\textls}[2][5]{%
\begingroup\addfontfeatures{LetterSpace=#1}#2\endgroup
}
\renewcommand{\allcapsspacing}[1]{\textls[15]{#1}}
\renewcommand{\smallcapsspacing}[1]{\textls[10]{#1}}
\renewcommand{\allcaps}[1]{\textls[15]{\MakeTextUppercase{#1}}}
\renewcommand{\smallcaps}[1]{\smallcapsspacing{\scshape\MakeTextLowercase{#1}}}
\renewcommand{\textsc}[1]{\smallcapsspacing{\textsmallcaps{#1}}}
\usepackage{fontspec}
\setmainfont{TeX Gyre Pagella}
\setsansfont{TeX Gyre Heros}[Scale=MatchUppercase]
\fi
should produce a quite similar output. The method for choosing the font may be different on your machines, it mostly depends on the installation; so mileage may vary. (Please, ask in comments if the proposed code doesn't work for you.)
Both MWE 1 and MWE 2 compile with pdfLaTeX. Neither MWE 1 nor MWE 2 compiles with XeLaTeX. This is at the command line - the editor is irrelevant.
The following MWE demonstrates the problem:
\documentclass{tufte-book}
\title{this is a title}
\author{me}
\begin{document}
\maketitle
\end{document}
The issue apparently has to do with \MakeTextUppercase
which is triggering an error with \maketitle
for XeLaTeX but not pdfLaTeX.
Just to clarify, \MakeTextUppercase
is provided by textcase
. However, I cannot reproduce the error with textcase
alone so it has something to do with tufte
's usage of it.