-
-
Save pydanny/d6a33e2d51384da36b43f8b44d8fc316 to your computer and use it in GitHub Desktop.
| % 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} | |
| ? |
@pydanny hmm.. have you tried this using TeXMaker? The log/error output is generally informative and helpful.
The build options for XeLaTeX work for me. As does the quick build for DVI->PS.
Modifying the options via Option=>Configure Texmaker=>(Commands and Quick Build) may prove useful.
Wish I could be more helpful.
@clayball, I'll give TeXMaker a try!
I think it is adding an extension for you: note PTSansNarrow-Regular.ttf.ttf is what it was searching for.
What is your current font declaration?
@pydanny, best of luck with everything!
Also, I should mention that I cannot reproduce the initial error. My guess is it's related to your current font declaration.
Strangely when I look at the PT Sans Narrow font on my comp, it comes in a .ttc font collection rather than an individual file. Had you generated them manually?
@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.
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}
Okay, at http://tex.stackexchange.com/questions/358996/fontspec-warning-tu-clash I found that I needed to run
sudo fmtutil-sys --all. That resolved the fontspec clash, but I have a new error:For reference, PTSansNarrow-Regular.ttf is very much in my fonts directory. 😢