9

How to make \uparrow to be as long as the object left to it? Is there a way like for brackets \right] ? How to make this look nice:

\documentclass[15pt, a4paper]{scrartcl}

\usepackage{amsmath,amssymb,stmaryrd}   

\begin{document}

\[ s_R \uparrow \Rightarrow \left( \dfrac{L_A}{L}\right)_{dec.} \uparrow \]

\end{document}

enter image description here

I'm looking for an easy way within the environment [] or align. I hope there is a tikz-free way for achieving this. Thank you :)

2 Answers 2

5

Try \left. ... \right\uparrow

If dec. is a name you also ought to use _{\textup{dec.}} do it is not read as three indices and a dot.

2
  • In this way, I may vary the size of the uparrow with left-phantoms, like \left\vphantom{\frac{a}{b}} \right\uparrow
    – Mac
    Mar 25, 2015 at 15:20
  • @Mac Then I'd just use Egregs solution or just \Big\uparrow. Typing all that makes your code unnecessarily complicated and cluttered. I tend to label it typographical noise
    – daleif
    Mar 25, 2015 at 15:22
4

The \uparrow symbol is a growing delimiter:

\documentclass{article}
\usepackage{amsmath,xparse,mleftright}

\NewDocumentCommand{\up}{som}{%
  \IfBooleanTF{#1}
    {\upext{#3}}
    {#3\IfNoValueTF{#2}{\mathord}{#2}\uparrow}%
}
\NewDocumentCommand{\upext}{m}{%
  \mleft.\kern-\nulldelimiterspace#1\mright\uparrow
}

\begin{document}
\[
\up{s^{}_R}
\up[\big]{s^{}_R}
\up[\Big]{s^{}_R}
\up[\bigg]{s^{}_R}
\up[\Bigg]{s^{}_R}
\up*{\mleft(\dfrac{L_A}{L}\mright)_{\textup{dec.}}}
\]
\end{document}

Note the usage of \mleft and \mright not to introduce unwanted spaces. In the case no optional argument is used, the \uparrow is considered an ordinary symbol with \mathord; otherwise \big and friends will take care of this.

enter image description here

3
  • 1
    Is it necessary to use the NewDocumentCommands? I'm fine with the \Big \uparrow version. Did not realize that a manipulation of the arrows is possible that easy :)
    – Mac
    Mar 25, 2015 at 15:22
  • 1
    @Mac \newcommand{\bup}{\Big\uparrow} and then $s_R\bup$
    – egreg
    Mar 25, 2015 at 16:02
  • This is a helpful answer but it looks so complicated. In my case, I simply replaced \uparrow with \big \uparrow and got the result I wanted.
    – littleO
    Apr 11, 2022 at 6:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .