[XeTeX] bug using \underbrace with unicode-math package

Philip TAYLOR (Webmaster, Ret'd) P.Taylor at Rhul.Ac.Uk
Mon Sep 12 00:15:44 CEST 2011


Sorry, the message became double-spaced (copy-and-paste
from TeXworks) -- I will try a second time.



\documentclass{article} \RequirePackage{amsmath} \RequirePackage{unicode-math} \setmathfont{xits-math.otf}

\def\midshift#1{
\setbox0=\hbox{#1}\dimen0=\ht0\advance\dimen0by+\dp0\advance\dimen0by-1ex
\lower.5\dimen0\box0 }

\def\rotatebrace#1{%
\leavevmode\setbox0=\hbox{#1}\rlap{%
\kern.5\wd0\dimen0=\ht0\advance\dimen0by-\dp0%\advance\dimen0by+1ex%
\raise.5\dimen0\hbox{\special{x:gsave}\special{x:rotate 90}}}%
\box0\special{x:grestore}}

\XeTeXmathchardef\bracelu = 0 3 `\⎧
\XeTeXmathchardef\bracemu = 0 3 `\⎨
\XeTeXmathchardef\braceru = 0 3 `\⎩
\XeTeXmathchardef\bracebar = 0 3 `\⎪
\XeTeXmathchardef\braceld = 0 3 `\⎫
\XeTeXmathchardef\bracemd = 0 3 `\⎬
\XeTeXmathchardef\bracerd = 0 3 `\⎭

\def\upbracefill{%
\setbox0=\hbox{\lower.64ex\hbox{\rotatebrace{\midshift{$\bracemu$}}}}\ht0=.1\wd0\dp0=0pt%
\setbox1=\hbox{\lower.64ex\hbox{\rotatebrace{\midshift{$\bracelu$}}\kern-.2em}}\ht1=.1\wd0\dp1=0pt%
\setbox2=\hbox{\lower.64ex\hbox{\rotatebrace{\midshift{$\bracebar$}}}}\ht2=.1\wd0\dp2=0pt%
\setbox3=\hbox{\lower.64ex\hbox{\kern-.2em\rotatebrace{\midshift{$\braceru$}}}}\ht3=.1\wd0\dp3=0pt%
\box1\cleaders\copy2\hfill\box0\cleaders\box2\hfill\box3}

\def\downbracefill{%
\setbox0=\hbox{\lower.64ex\hbox{\rotatebrace{\midshift{$\bracemd$}}}}\ht0=.1\wd0\dp0=0pt%
\setbox1=\hbox{\lower.64ex\hbox{\rotatebrace{\midshift{$\braceld$}}\kern-.2em}}\ht1=.1\wd0\dp1=0pt%
\setbox2=\hbox{\lower.64ex\hbox{\rotatebrace{\midshift{$\bracebar$}}}}\ht2=.1\wd0\dp2=0pt%
\setbox3=\hbox{\lower.64ex\hbox{\kern-.2em\rotatebrace{\midshift{$\bracerd$}}}}\ht3=.1\wd0\dp3=0pt%
\box1\cleaders\copy2\hfill\box0\cleaders\box2\hfill\box3}%

\setmathfont {XITS Math}

\begin {document}

$$ \underbrace{xyz} $$

\end{document}


Philip Taylor


--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20110911/e43efa5a/attachment.html>


More information about the XeTeX mailing list