xunicode expansion problem (was Re: [XeTeX] Hyphenation of "--"
with tex-text mapping on)
Will Robertson
will at guerilla.net.au
Fri Nov 25 01:29:59 CET 2005
On 25/11/2005, at 2am, Bruno Voisin wrote:
> Le 24 nov. 05 à 14:29, Bruno Voisin a écrit :
>
>> A late follow-up to this thread: I've just realized that, in LaTeX
>> 2e, the recommended way of entering en- and em-dashes is through
>> the commands \textendash and \textemdash. That solves the above
>> problem (like the \Dash macro you used with plain TeX, I guess).
By the way, did you see the thread just recently about using active
characters to make — (real em dash, OPT+SHIFT+HYPHEN) insert a smart
em-dash that allows line breaks after but not before itself?
I think this is a very nice solution since it does clutter up the
source, but if you don't actually mind typing \textemdash, you can do
similar things with, e.g., the \Dash command from ltugboat.cls.
> Using \textendash further, I've just realized a problem can occur
> in combination with the xunicode package.
[snip]
> \settowidth{\chapnowd}{\normalfont\normalsize\bfseries A.9
> \textendash\ }
>
> things still work OK. But if I add the xunicode package on top of
> this, then it seems \textendash is not taken into account when
> \chapnowd is measured (in \settowidth), and the chapter numbers in
> the toc are superposed partly on the chapter titles.
This sounds like an odd problem, but trying to narrow it down didn't
help me isolate it. Do you get incorrect results with the following?
(I'm still on XeTeX 0.94, haven't had the opportunity to upgrade
yet...oops)
\documentclass{article}
\usepackage{xunicode}
%\usepackage{fontspec}
%\setromanfont{Hoefler Text}
\begin{document}
\def\1{\normalfont\normalsize\bfseries A.9 \textendash\ }
\def\marker{\rule{0.4pt}{\baselineskip}}
\newlength\templength
\marker\1\marker % the actual text
\settowidth\templength{\1}
\marker\rule{\templength}{1ex}\marker % the measured width of the box
\end{document}
> Package hyperref Warning: The anchor of a bookmark and its parent's
> must not
> (hyperref) be the same. Added a new anchor on input
> line 748.
Yeah, hyperref can be a bit cryptic. But its capabilities are so good
I have a hard time complaining about its lack of documentation in
areas. comp.text.tex does have answers to most of the common problems
encountered with it.
Will
More information about the XeTeX
mailing list