9

Why aren't the arrows put under the equal sign if they are less than .7em or .3cm?

\documentclass{article}
\usepackage{mathtools}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\newcommand{\bigswarrow}[1]{\tikz{\draw[->](#1,3ex)--(0,0);}}
\begin{document}
\foreach \wid in {.1,.2,...,1}
{\bigswarrow{\wid em}}

\foreach \wid in {.1,.2,...,1}
{$\underset{\bigswarrow{\wid em}}{=}$}

\foreach \wid in {.1,.2,...,1}
{\bigswarrow{\wid}}

\foreach \wid in {.1,.2,...,1}
{$\underset{\bigswarrow{\wid}}{=}$}
\end{document}

enter image description here

6

Adding baseline fixes it, I believe.

\documentclass{article}
\usepackage{mathtools}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\newcommand{\bigswarrow}[1]{\tikz[baseline]{\draw[->](#1,3ex)--(0,0);}}
\begin{document}
\foreach \wid in {.1,.2,...,1}
{\bigswarrow{\wid em}}

\foreach \wid in {.1,.2,...,1}
{$\underset{\bigswarrow{\wid em}}{=}$}

\foreach \wid in {.1,.2,...,1}
{\bigswarrow{\wid}}

\foreach \wid in {.1,.2,...,1}
{$\underset{\bigswarrow{\wid}}{=}$}
\end{document}

enter image description here

5

Don't know why, but here is a fix. I put the underset arrows inside of an \hbox{...}

\documentclass{article}
\usepackage{mathtools}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\newcommand{\bigswarrow}[1]{\tikz{\draw[->](#1,3ex)--(0,0);}}
\begin{document}
\foreach \wid in {.1,.2,...,1}
{\bigswarrow{\wid em}}

\foreach \wid in {.1,.2,...,1}
{$\underset{\hbox{\bigswarrow{\wid em}}}{=}$}

\foreach \wid in {.1,.2,...,1}
{\bigswarrow{\wid}}

\foreach \wid in {.1,.2,...,1}
{$\underset{\hbox{\bigswarrow{\wid}}}{=}$}
\end{document}

enter image description here

Alternately, giving a hat tip to marmot, I could force \bigswarrow onto the baseline by way of stackengine:

\usepackage{stackengine}
\newcommand{\bigswarrow}[1]{\abovebaseline[0pt]{\tikz{\draw[->](#1,3ex)--(0,0);}}}

Then, I wouldn't need the \hboxes.

  • Though the math mode inside the \hbox isn't really necessary, is't it? – campa Nov 9 '18 at 16:58

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.