# Broken Arrow in Lucida Bright Font

When I attempt to use any kind of "long" arrow in the Lucida Bright font, it ends up coming out broken. For a MWE Consider the following:

\documentclass[10 pt]{article}

\usepackage{amsmath,amssymb}

\usepackage{fontspec}
\usepackage{unicode-math}

\setmainfont{Lucida Bright OT}
\setsansfont{Lucida Sans OT}
\setmonofont{Lucida Sans Typewriter OT}

\setmathfont{Lucida Bright Math OT}

\begin{document}

Here is an example of an arrow which looks weird:

\begin{gather}
\widehat{\mathcal{O}_v}\otimes_{\mathcal{O}_v} k\xrightarrow{\approx}\widehat{k}
\end{gather}

here is another example:

\begin{gather}
\varprojlim k[T]/(T^n)
\end{gather}

\end{document}

-

The \xrightarrow and \varprojlim commands use a minus sign for extending the arrow; in the Lucida Math font this has not the same height as the arrow; you can use a different symbol, though, namely "HORIZONTAL LINE EXTENSION U+23AF", that's available in unicode-math under the name \harrowextender; just redefine \relbar to use it:

\documentclass[10pt]{article}

\usepackage{amsmath}

\usepackage{fontspec}
\usepackage{unicode-math}

\setmainfont{Lucida Bright OT}
\setsansfont{Lucida Sans OT}
\setmonofont{Lucida Sans Typewriter OT}

\setmathfont{Lucida Bright Math OT}

\renewcommand{\relbar}{\mathrel{\harrowextender}}

\begin{document}

Here is an example of an arrow which looks weird:
$\widehat{\mathcal{O}_v}\otimes_{\mathcal{O}_v} k\xrightarrow{\approx}\widehat{k}$
here is another example:
$\varprojlim k[T]/(T^n)$

\end{document}


By the way, I don't think amssymb does any good with unicode-math.

-
Thank you so much! – Alex Youcis Mar 23 '13 at 16:23
This did not work for me using XeLaTeX and TeX Gyre Pagella as maths font. The extended part of the arrow is invisible. – José Figueroa-O'Farrill Dec 28 '14 at 2:24
@JoséFigueroa-O'Farrill Unfortunately, none of the TeX Gyre math fonts has the glyph; just don't redefine \relbar and you should be OK – egreg Dec 28 '14 at 10:24
The reason I found this question/answer is that actually it's not OK. I get an ugly dashed arrow when I use \xrightarrow. – José Figueroa-O'Farrill Dec 28 '14 at 14:32
@JoséFigueroa-O'Farrill I'm afraid it's a bug in TeX Gyre Pagella, then: they should provide U+23AF – egreg Dec 28 '14 at 14:36

try this setting:

\usepackage{unicode-math}
\setmainfont{Lucida Bright OT}
\setsansfont{Lucida Sans OT}
\setmonofont{Lucida Sans Typewriter OT}
\setmathfont{Lucida Bright Math OT}
\setmathfont[range={"2190,"2192,"2212}]{TeXGyrePagellaMath-Regular}


or alternatively to using Pagella

\makeatletter
\ams@def\relbar{\raisebox{-0.35pt}{$-$}}
\makeatother


(after loading amsmath). Here is my complete test example:

\documentclass{article}
\usepackage{amsmath}
\usepackage{unicode-math}
\setmainfont{Lucida Bright OT}
\setsansfont{Lucida Sans OT}
\setmonofont{Lucida Sans Typewriter OT}
\setmathfont{Lucida Bright Math OT}
\setmathfont[range={"2190,"2192,"2212}]{XITS Math}
%\makeatletter
%\ams@def\relbar{\raisebox{-0.35pt}{$-$}}
%\makeatother

\begin{document}
\begin{gather}
\widehat{\mathcal{O}_v}\otimes_{\mathcal{O}_v} k\xrightarrow{\approx}\widehat{k}
\end{gather}

\begin{gather}
\varprojlim k[T]/(T^n)
\end{gather}

\end{document}

-
Thank you very much! I am getting an error when I try to implement this code though. It says that the font "TeXGyrePagellaMath-Regular" cannot be found, and that I should reference the "fontspec" documentation (I am using fontspec). Also, when I try your second fix it says that "\relbar" is not defined. – Alex Youcis Mar 23 '13 at 8:27
Which TeX-system do you have? And did you updated it? You can also use XITS Math instead. See my edited answer for a complete document – Herbert Mar 23 '13 at 8:31
Herbert, I apologize if I am misunderstanding you. I am using Tex Shop for Mac. I don't know what XITS Math is, as well. – Alex Youcis Mar 23 '13 at 8:33
XITS is a font and should be installed by default. With MacTeX you can also update your system. However, if you use xelatex (I used lualatex) you have to use as name xits-math.otf instead of the symbolic name XITS Math – Herbert Mar 23 '13 at 8:38
Herbert, I apologize for being so dense, but I'm not exactly sure how to implement your suggestions. Is XITS Math some kind of package I need to include? Do I need to download it? Thanks! – Alex Youcis Mar 23 '13 at 8:49