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

Herbert Schulz herbs at wideopenwest.com
Sun Feb 14 22:02:17 CET 2016


> On Feb 14, 2016, at 2:44 PM, Alan Munn <amunn at gmx.com> wrote:
> 
> Please don’t cross post on mailing lists and Stackexchange.
> 
> http://tex.stackexchange.com/q/292904/2693
> 
> Since you’ve already gotten answers there, it’s wasting people’s time who just read one or the other.
> 
> Alan
> 
> 
> 
>> On Feb 14, 2016, at 2:24 PM, Chris Lott <chris at chrislott.org> wrote:
>> 
>> 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>

Howdy,

And it's not really a `TeXShop Problem' either! PTeX needs most non-ASCII unicode characters to be encoded as UTF{xxxx} in the file so, if you have the TeXShop->Preferences->Misc->pTeX support->utf export checked, TeXShop is translating the user readable form to the form required by pTeX.

Sounds like pilot error to me.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)







----------- 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