Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

the not-quite-right results

I've been fighting with XeLaTeX (from a full TeX Live 2011 install on a linux box) for the past few hours and am finally almost at the result I want, but (as shown above) the overarrows aren't stretching to cover all the letters and the sqrt doesn't have its vinculum/overbar and I'm at a loss. What can I do to fix it?


% no page numbers (and maybe other cleanness?)

% don't hyphenate, don't indent

% color

% XeTeX fonts

\setmainfont[Mapping=tex-text]{Bera Sans}
\setmathfont[range=\mathup]{Bera Sans}
\setmathfont[range=\mathbfup]{Bera Sans Bold}
\setmathfont[range=\mathbfit]{Bera Sans Bold Oblique}
\setmathfont[range=\mathit]{Bera Sans Oblique}

This means that $\overleftrightarrow{AD}$ contains $F$  We write that as $3=\sqrt{9}$.  The \emph{square root} symbol is sometimes called a \emph{radical} symbol.
share|improve this question
Use \setmathfont{XITS Math} –  egreg Feb 17 '12 at 23:34
@egreg: Thanks. Changing the STIXGeneral to XITS Math fixed the radical and moved the overarrow to the center, but didn't stretch it—see i.stack.imgur.com/DqJZc.png –  Isaac Feb 17 '12 at 23:36
I don't think that \overleftrightarrow is stretchable. –  egreg Feb 17 '12 at 23:39
@egreg: codecogs.com/latex/eqneditor.php renders it as if it's stretchable... I thought I'd seen it stretchable elsewhere, but maybe not. Is there something I should use instead for the same effect? –  Isaac Feb 17 '12 at 23:42
It is with pdflatex; it doesn't seem to be so with unicode-math. –  egreg Feb 17 '12 at 23:47
show 2 more comments

1 Answer

up vote 5 down vote accepted

The arrow stretches for me if I add


then use \savedoverleftrightarrow in the expression.

share|improve this answer
Yes, because it uses the amsmath definition. Something that the developers of unicode-math should look at. –  egreg Feb 18 '12 at 0:18
This did it—I put \let\savedoverleftrightarrow\overleftrightarrow right after loading amsmath, then \def\overleftrightarrow{\savedoverleftrightarrow} after all the other package loads and now \overleftrightarrow works as expected. –  Isaac Feb 18 '12 at 0:19
@egreg: Since I'm loading unicode-math before amsmath, wouldn't the amsmath definition overwrite one coming from unicode-math? If so, wouldn't the problem be in xltxtra or sfmath? –  Isaac Feb 18 '12 at 0:20
@Isaac a whole load of definitions appear to be delayed (you set up the math fonts later for example) but I didn't trace exactly where the erroneous definition is coming from (actually that was the first time I've run xelatex:-) –  David Carlisle Feb 18 '12 at 0:26
@Isaac amsmath should be loaded before unicode-math and sfmath doesn't make much sense in this context. –  egreg Feb 18 '12 at 0:27
show 2 more comments

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.