Created
March 17, 2017 17:19
-
-
Save pydanny/d6a33e2d51384da36b43f8b44d8fc316 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Our tocloft configuration | |
\usepackage{tocloft} | |
\newlength{\mylen} %% extra space | |
\setlength{\mylen}{.2cm} | |
\addtolength{\cftsecnumwidth}{\mylen} % add the extra space after section numbers | |
\addtolength{\cftsubsecnumwidth}{\mylen} % add the extra space after subsection numbers | |
% How we load fontspec | |
\usepackage{fontspec} | |
% A sample TOC header | |
\chapter*{Authors' Notes} | |
\addcontentsline{toc}{chapter}{Authors' Notes} | |
% The error we get | |
xelatex -shell-escape screen.tex | |
This is XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016) (preloaded format=xelatex) | |
\write18 enabled. | |
entering extended mode | |
(./screen.tex | |
LaTeX2e <2016/03/31> | |
Babel <3.9r> and hyphenation patterns for 22 language(s) loaded. | |
(./main.tex (/usr/local/texlive/2016basic/texmf-dist/tex/latex/base/book.cls | |
Document Class: book 2014/09/29 v1.4h Standard LaTeX document class | |
(/usr/local/texlive/2016basic/texmf-dist/tex/latex/base/bk10.clo)) | |
(/usr/local/texlive/2016basic/texmf-dist/tex/latex/listings/listings.sty | |
(/usr/local/texlive/2016basic/texmf-dist/tex/latex/graphics/keyval.sty) | |
(/usr/local/texlive/2016basic/texmf-dist/tex/latex/listings/lstmisc.sty) | |
(/usr/local/texlive/2016basic/texmf-dist/tex/latex/listings/listings.cfg)) | |
(/usr/local/texlive/2016basic/texmf-dist/tex/latex/fontspec/fontspec.sty | |
(/usr/local/texlive/2016basic/texmf-dist/tex/latex/l3kernel/expl3.sty | |
(/usr/local/texlive/2016basic/texmf-dist/tex/latex/l3kernel/expl3-code.tex) | |
(/usr/local/texlive/2016basic/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def)) | |
(/usr/local/texlive/2016basic/texmf-dist/tex/latex/l3packages/xparse/xparse.sty | |
) | |
(/usr/local/texlive/2016basic/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty | |
************************************************* | |
* fontspec warning: "tu-clash" | |
* | |
* I have found the tuenc.def encoding definition file but the TU encoding is | |
* not defined by the LaTeX2e kernel; attempting to correct but you really | |
* should update to the latest version of LaTeX2e. | |
************************************************* | |
(/usr/local/texlive/2016basic/texmf-dist/tex/latex/base/fontenc.sty | |
(/usr/local/texlive/2016basic/texmf-dist/tex/latex/base/tuenc.def | |
! Missing \endcsname inserted. | |
<to be read again> | |
\def | |
l.252 ... \UnicodeEncodingName {}{"007E} | |
? |
Does get you a functional font declaration? My guess is that if you don't pass an explicit Extension parameter it defaults to Extension = .ttf
which seems backwards for xelatex given it's otf support, but 🤷♀️.
\setsansfont [Path = fonts/,
Extension = .ttf,
UprightFont = PTSansNarrow-Regular,
BoldFont = OpenSans-Bold,
ItalicFont = AvenirNextCondensed-Italic
]
{PTSansNarrow}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@mpacer, the font declaration causing the problem is:
\setsansfont [Path = fonts/, UprightFont = PTSansNarrow-Regular.ttf, BoldFont = OpenSans-Bold.ttf, ItalicFont = AvenirNextCondensed-Italic.ttf ] {PTSansNarrow.ttf}
The font is stored in a
fonts
directory. It's also in my Mac's fontbook utility. Not sure if there's a conflict.However, what've discovered though is that when I comment out this command, the book compiles without a problem. In the rendered book's section on typographical conventions, everything looks fine. HOORAY!
So I think the problem is resolved. However, since the book is 527 pages, it might be a while before we discover any problems.