I am using \longrightarrow{}
in my document. however in the PDF it appears in two pieces instead of a long line. I tried using \chemarrow
but it produces very short arrow.
The size of arrow thats produce by \longrightarrow{}
is just right for my document. Is there a way to make it one line.
Thanks
Since the topic came, is there a way to set the desired length of arrow.
Here is sample code with result
\documentclass[fleqn,12pt,a4paper]{article}
\usepackage{amstext, amsmath}
\usepackage{chemarrow}
\newcommand{\lra}{\ensuremath{\longrightarrow{}}}
\let\rightarrow\chemarrow
\begin{document}
Test \lra Result
\end{document}
Best Answer
I find the horizontal spacing of the chemarrows in mathematical formulas surprisingly bad. It may well be that the spacing is adjusted to the use in chemistry. If you want an arrow with (approximately) the same length and spacing as a
\longrightarrow
, then you can use this code:The
xspace
package is only needed for having\lra
behave in the same way as$\lra$
(otherwise TeX wouldn't put a space after\lra
). It is always a good idea to include an\xspace
if you use\ensuremath
in a macro that takes no arguments.