[OS X TeX] Unicode en-dash problems on XeLaTeX

Chris Lott chris at chrislott.org
Sun Feb 14 14:24:19 EST 2016


Given the simple document below, why does the en-dash (and only the
en-dash) unicode character cause this error:

./dash-testing.te.tex:13: Undefined control sequence.
l.13 Hello\UTF
              {2013}world!

I've tested with various fonts, all of which have this common
character in the proper Unicode "position" in the font (verified with
InDesign Glyph Viewer, etc).

The filetype is UTF-8:
$ file -I dash-testing.te.tex
dash-testing.te.tex: text/x-tex; charset=utf-8

Here is what the file looks like if I "Continue" past the error:
https://db.tt/EeI7pIMP

Why does just the en-dash hate me?

***
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Gentium Plus}

\begin{document}

Hello---world!

Hello—world!

Hello--world!

Hello–world!

Demonstrating that “other” unicode characters work:

¶

Baby, it's cold° outside.

\end{document}
***

c
--
Chris Lott <chris at chrislott.org>



More information about the MacOSX-TeX mailing list