[XeTeX] Missing DeclareTextSymbol

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Sun Aug 26 18:19:25 CEST 2007


I think xetex should include the following DeclareTextSymbol commands
somewhere. The commands like \textdollar etc. are used e.g. by
listings.sty, and without DeclareTextSymbol these characters are taken
from the Roman font rather than the current font like tt. Perhaps some
non-ASCII characters should be treated similarly.

I'm not sure about "'` — whether they should use ASCII characters or
typographic quotes.

\documentclass[a4paper]{article}
\usepackage{fontspec}
\DeclareTextSymbol{\textquotedbl}{EU1}{`\"}
\DeclareTextSymbol{\textdollar}{EU1}{`\$}
\DeclareTextSymbol{\textquoteright}{EU1}{`\'}
\DeclareTextSymbol{\textless}{EU1}{`\<}
\DeclareTextSymbol{\textgreater}{EU1}{`\>}
\DeclareTextSymbol{\textbackslash}{EU1}{`\\}
\DeclareTextSymbol{\textasciicircum}{EU1}{`\^}
\DeclareTextSymbol{\textunderscore}{EU1}{95}
\DeclareTextSymbol{\textquoteleft}{EU1}{`\`}
\DeclareTextSymbol{\textbraceleft}{EU1}{`\{}
\DeclareTextSymbol{\textbar}{EU1}{`\|}
\DeclareTextSymbol{\textbraceright}{EU1}{`\}}
\DeclareTextSymbol{\textasciitilde}{EU1}{`\~}
\begin{document}
\tt
\textquotedbl
\textdollar
\textquoteright
\textless
\textgreater
\textbackslash
\textasciicircum
\textunderscore
\textquoteleft
\textbraceleft
\textbar
\textbraceright
\textasciitilde
\end{document}

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak at knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/



More information about the XeTeX mailing list