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

Chris Lott chris at chrislott.org
Sun Feb 14 20:24:19 CET 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>

----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://www.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex



More information about the macostex-archives mailing list