## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ Draw this arrow

Information and discussion about graphics, figures & tables in LaTeX documents.
coachbennett1981
Posts: 260
Joined: Fri Feb 05, 2010 10:15 pm

### Draw this arrow

Hey everyone,

I am trying to draw the red arrow using tikz. I have looked around, but I can't seem to find a simple code (if it exists) the closest code I could find was

\draw[-{Triangle[width=18pt,length=8pt]}, line width=10pt](0,0) -- (1, 0);

I could not change the color to what I wanted. Any help would be appreciated.

Nick
Screen Shot 2023-01-17 at 6.47.18 PM.png (26.62 KiB) Viewed 273 times

LaTeXguide.org • LaTeX-Cookbook.net

Bartman
Posts: 321
Joined: Fri Jan 03, 2020 2:39 pm

### Draw this arrow

One suggestion with an arrow without a border, as in the source code snippet,

\documentclass{article}
\usepackage{tikz}
\usepackage[hmargin=3cm,showframe]{geometry}

\usetikzlibrary{tikzmark,arrows.meta}

\tikzset{
shorten <>/.style={shorten >= #1, shorten <= #1}
}

\begin{document}
$\int 4x^3 \sqrt{x^4-6}\;dx = \int \sqrt{x^4-6}\;\;4x^3\; \tikzmarknode{left eq}{dx} \hspace{2cm} \tikzmarknode{right eq}{\int} \sqrt{u}\;du = \frac{2}{3} u^{3/2} +C = \frac{2}{3} (x^4-6)^{3/2} +C$
\tikz[remember picture, overlay]
\draw[
-{Triangle[width=18pt,length=8pt]},
line width=10pt,
pink,
shorten <>=12pt
]
(left eq.east) -- (left eq.east-|right eq.west)
;
\end{document}

and one for an arrow with a border, as in the figure.

\documentclass{article}
\usepackage{tikz}
\usepackage[hmargin=3cm,showframe]{geometry}

\usetikzlibrary{tikzmark,shapes.arrows}

\tikzset{
pink arrow/.style={
single arrow,
thick,
draw,
fill=pink,
minimum height=1.2cm
}
}

\begin{document}
$\int 4x^3 \sqrt{x^4-6}\;dx = \int \sqrt{x^4-6}\;\;4x^3\; \tikzmarknode{left eq}{dx} \hspace{2cm} \tikzmarknode{right eq}{\int} \sqrt{u}\;du = \frac{2}{3} \sqrt{u^3} +C = \frac{2}{3} \sqrt{(x^4-6)^3} +C$
\tikz[remember picture, overlay]
\path (left eq.east) -- node [pink arrow] {} (left eq.east-|right eq.west);
\end{document}