On Wed, 28 Jun 2006, Aditya Mahajan wrote:
Hi, Does ConTeXt have anything equivalent to xleftarrow, xrightarrow of amsmath. Basically, I need a command that can do
A \xleftarrow[subscript]{superscript} B
should give
superscript A <----------- B subscript
and similar for xrightarrow, xleftrightarrow, xLeftarrow, xRightarrow and xLeftRightarrow.
The closest that I could come to it was (only for superscripts)
\def\xrightarrow#1{\buildrel{#1}\over\longrightarrow}
But this is not extendable.
\xrightarrow{big superscipt}
Any suggestions?
This is how it is defined in amsmath.sty \def\ext@arrow#1#2#3#4#5#6#7{% \mathrel{\mathop{% \setbox\z@\hbox{#5\displaystyle}% \setbox\tw@\vbox{\m@th \hbox{$\scriptstyle\mkern#3mu{#6}\mkern#4mu$}% \hbox{$\scriptstyle\mkern#3mu{#7}\mkern#4mu$}% \copy\z@ }% \hbox to\wd\tw@{\unhbox\z@}}% \limits \@ifnotempty{#7}{^{\if0#1\else\mkern#1mu\fi #7\if0#2\else\mkern#2mu\fi}}% \@ifnotempty{#6}{_{\if0#1\else\mkern#1mu\fi #6\if0#2\else\mkern#2mu\fi}}}% } \newcommand{\xrightarrow}[2][]{\ext@arrow 0359\rightarrowfill@{#1}{#2}} \newcommand{\xleftarrow}[2][]{\ext@arrow 3095\leftarrowfill@{#1}{#2}} I tried to contextify this, but keep on getting missing $ errors. Aditya