4

My goal is to create a symbol with an arrow and a variable length argument under it.

The top line in the picture shows how I want the symbol to look, generated using \underset{\quad \ \rightarrow k+1}{r}, however the spacing I have to introduce to the underset creates an unwanted space between this and A. Additionally, this spacing must be tuned to match the length of the variable length argument.

The second option uses \underrightarrow{r}_{k+1}, which removes the unwanted space, but uses an uglier arrow and places the subscript too high.

Can anyone think of a more elegant solution for me?

enter image description here

  • A similar way with these solutions: tex.stackexchange.com/questions/395603/… may help – koleygr Oct 20 '17 at 12:24
  • 2
    You will meet a lot of nice people showing you how to typeset this weird thing, but are you required to use such a construction? It is very hard to read—the letter r is just too thin to support some kind of "limits" like \lim or \sum do. – jknappen Oct 20 '17 at 14:37
2
\documentclass[a4paper, 11pt]{article}
\usepackage{amsmath}


\begin{document}

   text

\fbox{$A\underset{\overset{\rightarrow}{}}{r}_{\overset{k+1}{}}$}

\fbox{$A\underset{\rightarrow}{r}_{k+1}$}


text
\end{document}

enter image description here

2

Like this, with the lapping commands from stackengine?

\documentclass{article}

\usepackage{stackengine}

\newcommand\isom{\mathrel{\stackon[-0.1ex]{\makebox*{\scalebox{1.08}{\AC}}{=\hfill\llap{=}}}{{\AC}}}}
\newcommand\nvisom{\rotatebox[origin=cc] {-90}{$ \isom $}}
\newcommand\visom{\rotatebox[origin=cc] {90} {$ \isom $}}

\begin{document}

\[ A \stackMath\brlap[1.4ex]{\scriptstyle\rightarrow k+1}r = B\]%

\end{document} 

enter image description here

2

With an array:

\documentclass{article}

\newcommand{\subarrow}[2]{%
  \mathord{% ensure math mode and grouping
    \renewcommand{\arraystretch}{0}%
    \begin{array}[t]{@{}c@{}l@{}}
    #1\\
    \scriptstyle\rightarrow&\scriptstyle#2
    \end{array} 
    \kern\scriptspace
  }%
}

\begin{document}

$A\subarrow{r}{k+1}B$

\end{document}

enter image description here

2

Here is the solution I came to based on koleygr's comment

\usepackage{stackengine}    
\stackengine{1pt}{$\, r$}{$ \scriptstyle \rightarrow k+1$}{U}{l}{F}{F}{S}

and here is this wrapped with an xparse command of the form \fut{r}_{k+1}^T with optional subscript and superscript

\NewDocumentCommand \fut
{m E{\_\^}{{}{}}}
{
\stackengine{1pt}
            {$\, {#1}^{#3}$}
            {$ \scriptstyle \rightarrow {#2}$}
            {U}{l}{F}{F}{S}
}

enter image description here

  • nice... Remember to come back and accept your answer next time – koleygr Oct 20 '17 at 12:47
1

if I understood the question correctly.

\documentclass{article}
\usepackage{amsmath}

\begin{document}
$A_{\overset{r}{\rightarrow}k+1}$
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.