To denote convergence of a sequence towards a limit, the usual \rightarrow
seems too short to me. My document uses Michael Barr's diagxy
package, which defines \to
, and that arrow is too long.
How might I get a more suitable length arrow for this?
Example:
\documentclass[12pt]{article}
\usepackage{amsfonts}
\newcommand{\tendsto}{\mathrel{\rightarrow}}
\newcommand{\N}{\mathbb{N}}
\usepackage{diagxy} %% redefines \to
\linespread{1.21}
\begin{document}
Let $(x_{n})_{n \in \N} \tendsto x$ in $X$. %% too short?
Let $(x_{n})_{n \in \N} \to x$ in $X$. %% too long!
\end{document}
The problem is more pronounced with the actual fonts I'm using, namely, Lucida Bright (\usepackage{lucidabr}
instead of \usepackage{amsfonts}
):
The longer arrow \to
from Barr's package (which is a nice length for function notation, as in $f \colon A \to B$
) is defined in this part of diagxy
:
\def\setwdth#1#2{\setbox0\hbox{$\labelstyle#1$}\wdth=\wd0%
\setbox0\hbox{$\labelstyle#2$}\ifnum\wdth<\wd0 \wdth=\wd0 \fi}%
\def\topppp/#1/<#2>^#3_#4{\:%
\ifnum#2=0%
\setwdth{#3}{#4}\deltax=\wdth \divide \deltax by \ul%
\advance \deltax by \defaultmargin \ratchet{\deltax}{100}%
\else \deltax #2%
\fi%
\xy\ar@{#1}^{#3}_{#4}(\deltax,0) \endxy%
\:}%
\def\toppp/#1/<#2>^#3{\ifnextchar_{\topppp/#1/<#2>^{#3}}{\topppp/#1/<#2>^{#3}_{}}}%
\def\topp/#1/<#2>{\ifnextchar^{\toppp/#1/<#2>}{\toppp/#1/<#2>^{}}}%
\def\toop/#1/{\ifnextchar<{\topp/#1/}{\topp/#1/<0>}}%
\def\to{\ifnextchar/{\toop}{\toop/>/}}%
Is there some suitable way to exploit code from diagxy
, or by other means, produce an arrow that's a bit longer than \rightarrow
but not as long as Barr's \to
?
\let\oldto\to \usepackage{diagxy}
\xrightarrow
fromamsmath
:\xrightarrow{\hspace{10pt}}
adjust this space to your needs. Of course you can create a new macro with your desired length:\newcommand{\myrightarrow}{\xrightarrow{\hspace{10pt}}}