Thanks for approving me.
Yesterday, after updating my MacTeX installation, I can no longer typeset my document with XeLaTeX. I have a launchd job that runs "tlmgr update --self --all" every day. I went back and checked the logs to see what was updated, and found the xetex and fontspec had updates.
Using the sample-book.tex file downloaded from the github website, I added the following code that allows it to be compiled with XeLaTeX:
\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}}}
\fi
I add the package "xeCJK" and assign the font.
Until yesterday, this worked perfectly.
The problem is with the xeCJK package. If I comment out that line, then the document will typeset. However, I need Japanese language support, which is why I'm using xeCJK and XeLaTeX.
I have attached the tex file that has the code above. Simple comment or uncomment to reproduce the errors below.
The error messages I get are all of the same type. Examples below.
! Extra }, or forgotten \endgroup.
<argument> \xeCJK_class_group_end:
\CJKecglue
l.530 ...idenote}[\docopt{number}][\docopt{offset}
]\{\docarg{Sidenote text.}\}
! Extra }, or forgotten \endgroup.
<argument> \xeCJK_class_group_end:
\CJKecglue
l.552 \doccmd{sidenote}[][\docopt{offset}
]\{\docarg{Sidenote text.}\}
! Extra }, or forgotten \endgroup.
<recently read> }
l.614 ...h{begin\{marginfigure\}[\docopt{offset}]}
\\
! Extra }, or forgotten \endgroup.
<recently read> }
l.618 ...sh{begin\{margintable\}[\docopt{offset}]}
\\
! Extra }, or forgotten \endgroup.
<argument> \xeCJK_class_group_end:
\CJKecglue
l.649 \doccmd{caption}[][\docopt{offset}
]\{\docarg{long caption}\}\\
! Extra }, or forgotten \endgroup.
<argument> \xeCJK_class_group_end:
\CJKecglue
l.650 ...}[\docarg{short caption}][\docopt{offset}
]%
! Extra }, or forgotten \endgroup.
<XeTeXinterchartoks> \xeCJK_class_group_end:
\CJKecglue
l.662 \doccmd{caption}[Hilbert curves...][6
pt]\{Hilbert curves...\}
When I typeset my own document, the errors are all of the same type.
My experience with deeply investigating these problems is limited, and I haven't been very successful in the past. What I can tell you is this. I went and redownloaded the MacTeX package, reinstalled it, and it started working again. using tlmgr, I updated xetex only, and it broke. With a fully updated TeXLive installation, simply removing the xeCJK package allows the document to compile file with XeLaTeX (provided the above mentioned code is added to the preamble). Of course, removing that package means none of the Japanese in my document is typeset.
I really like the Tufte layout, and would like to keep using it if possible. If anyone has anything thoughts, I would be very thankful.
Thank you.