7

I want to have something like this in LaTeX but I don't know how to add the labled arrow:

enter image description here

So the code I have is basically

\begin{equation}
    \begin{split}
        x^4 &= x \cdot x \cdot x \cdot x \\
        x^3 &= x \cdot x \cdot x
    \end{split}
\end{equation}

and I want to add an arrow on the right hand side pointing from the second to the first equation and labled "$\cdot x$".

I appreciate any help!

2

1 Answer 1

8

You could try the witharrows package:

\documentclass{article}
\usepackage{witharrows}

\begin{document}
$\begin{WithArrows}
x^4 &= x \cdot x \cdot x \cdot x \Arrow[tikz=<-]{${} \cdot x$} \\
x^3 &= x \cdot x \cdot x
\end{WithArrows}$
\end{document}

enter image description here

In order to change the curvature or arrow tip of the arrow, you can style it using TikZ options:

\documentclass{article}
\usepackage{witharrows}

\begin{document}
$\begin{WithArrows}
x^4 &= x \cdot x \cdot x \cdot x \Arrow[tikz={stealth-, in=100, out=80, looseness=1.5}]{${} \cdot x$} \\
x^3 &= x \cdot x \cdot x
\end{WithArrows}$
\end{document}

enter image description here

2
  • The arrow doesn’t curl enough to point to the top equation. Can that be fixed?
    – Simd
    Apr 23, 2023 at 5:58
  • 2
    @Simd Yes, see my edit. Apr 23, 2023 at 6:49

You must log in to answer this question.

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