[XeTeX] Missing left brace has been substituted

Zdenek Wagner zdenek.wagner at gmail.com
Mon Feb 6 21:23:07 CET 2012

2012/2/6 maxwell <maxwell at umiacs.umd.edu>:
> I'm getting a msg "Missing left brace has been substituted" in what Adobe
> Acrobat calls "bookmarks" (the section headings that you can optionally
> show on the left-hand side of a document in Adobe Reader and other PDF
> readers).  It does not appear in the Table of Contents.
> The xelatex input looks like this:
> ----------------
> \subsection{Auxiliary \emph{to be} and verbalizers
>  \pusArabicScript{کېدل} /kedə́l/ and
>  \pusArabicScript{کول} /kawə́l/}
> \label{sxn_aux}\hyperlabel{sxn_aux}%
> ----------------
Such macros certainly are not alowed in the PDF bookmarks and they are
expanded at the time where just a part of the expansion is visible by
the engine. Arabic can probably appear in the bookmarks but you cannot
select a font, a system font will always be used and you cannot be
sure that all potential users have an appropriate font installed. The
hyperref package provides the \textorpdfstring macro with two
parameters, the first one will be printed, the second one will be
displayed in the bookmarks. I used this macro in pdftex only but
hopefully it works in xetex too. You should provide an alternative
text for bookmarks without the use of macros in it.

> The part that triggers the error msg is apparently the
> \pusArabicScript{کېدل}.  This is a macro we've defined as
> ----------------
> \newfontfamily\pashtofont[Script=Arabic,Scale=1.7]{Scheherazade}
> \newcommand{\pusArabicScript}[1]{{\RL{\pashtofont #1}}}
> ----------------
> The error msg itself is contained in the file bidi.dtx, as follows:
> ----------------
> \let\n at xt=\
> \def\LRE{\protect\pLRE}%
> \def\pLRE{\protect\afterassignment\moreLRE \let\n at xt= }
> \def\RLE{\protect\pRLE}
> \def\pRLE{\protect\afterassignment\moreRLE \let\n at xt= }
> \def\bracetext{\ifcat\n at xt{\else\ifcat\n at xt}\fi
>  \errmessage{Missing left brace has been substituted}\fi \bgroup}
> ----------------
> I don't know enough about TeX to know what this is doing (or is supposed
> to be doing), or even if I've copied enough of the bidi.dtx file to make
> any sense.
> I've googled the error msg, but didn't come up with anything useful.  I
> can create a minimal file if need be, but before I do that I was hoping
> someone else had run into this (and come up with a work-around).
>   Mike Maxwell
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>  http://tug.org/mailman/listinfo/xetex

Zdeněk Wagner

More information about the XeTeX mailing list