1

I know commands like \underrightarrow{Text} which allow for annotatoin of an arrow. Is there a similar way to create an arrow pointing up-down with text annotation to its right? enter image description here

gschaaf
  • 147
  • 4
    Your question is too imprecise. You don't say which tools you are using (TikZ? something else?) nor the context. Please include a minimal working example in your question, to make the context clear. – frougon Aug 10 '19 at 09:15
  • 2
    Do you want to use this symbol in a figure (e.g. a commutative diagram) or in text? This is a very important detail which you haven't provided. – God bless Aug 10 '19 at 10:27

2 Answers2

2

This question is very vague, but since it comes from a new user, I'll give it a shot.

A symbol for use in text

\documentclass{article}

\usepackage{mathtools}
\usepackage{accents}

\newcommand{\ubar}[1]{\underaccent{\bar}{#1}}

\newcommand{\Jarrow}{\ubar{J}\!\!\downarrow}

\begin{document}

$\Jarrow$

\end{document}

Definition of \ubar was borrowed from this wonderful answer by egreg.

enter image description here

For use in figures (e.g. commutative diagrams)

\documentclass{article}

\usepackage{mathtools}
\usepackage{accents}
\usepackage{tikz}
\usepackage{tikz-cd}

\newcommand{\ubar}[1]{\underaccent{\bar}{#1}}

\begin{document}

% For general use in figures made in plain TikZ:

\begin{tikzpicture}
\draw[->] (0,0) -- (0,-1);
\node[scale=0.8] at (-0.2,-0.5) {$\ubar{J}$}; 
\end{tikzpicture}

% When making commutative diagrams:

\begin{tikzcd}
{} \arrow[d, "\ubar{J}"'] \\
{}
\end{tikzcd}

\end{document}

enter image description here

Note that you may use packages other than tikz-cd to make commutative diagrams (such as xypic), although, in my opinion, tikz-cd is the best.

Well, I hope this will be of some help to you. God bless and keep you always.

God bless
  • 1,767
1

With TiKz, define a newcommand with parameters

\arr{<length>}{<pos>}{<location>}{<text>}

Code:

\documentclass[margin=3mm,varwidth]{standalone}
\usepackage{tikz}
\newcommand{\arr}[4]{%
\begin{tikzpicture}[line width=0.35mm,>=stealth]%
\draw[->](0,0)--++(-90:#1)node[pos=#2,#3]{$\underline{#4}$};%
\end{tikzpicture}%
}

\begin{document}
\arr{1}{0.65}{left}{J}
\quad
\arr{0.5}{0.65}{right}{J}
\quad
\arr{0.85}{0.1}{above}{J}
\quad
\arr{0.85}{}{below}{J}
\\[0.5cm]
This is an arrow \arr{0.85}{0.65}{right}{J}with annotation.
\end{document}

enter image description here