Expanding on this question I'd like to know if it's possible to modify this macro to allow for text under the arrow as well, as the \xrightarrow[below]{under}
. I don't have any experience with macros but using the answer to the aforementioned question I tried this to no effect
\newlength{\arrow}
\settowidth{\arrow}{\scriptsize$1000$}
\newcommand*{\myrightarrow}[2]{\xrightarrow[#1]{\mathmakebox[\arrow]{#2}}}
What would be the right way to do this?
Best Answer
Here is a
\xxrightarrow
that has a first mandatory argument, the desired subscript to which the arrow should adapt (see the examples in the test document below).So you call it as
where
<below>
is optional.