Graphics, Figures & TablesDraw this arrow

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

Draw this arrow

Post by coachbennett1981 »

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

Code: Select all

\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
Screen Shot 2023-01-17 at 6.47.18 PM.png (26.62 KiB) Viewed 2702 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
Bartman
Posts: 366
Joined: Fri Jan 03, 2020 2:39 pm

Draw this arrow

Post by Bartman »

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

Code: Select all

\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.

Code: Select all

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

\usetikzlibrary{tikzmark,shapes.arrows}

\tikzset{
  pink arrow/.style={
    single arrow,
    single arrow head extend=1.5mm,
    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}
Post Reply