GeneralA very long arrow

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Stefanie
Posts: 25
Joined: Fri Apr 04, 2008 2:39 pm

A very long arrow

Post by Stefanie »

Hi guys,

i need to insert a very long arrow in my latex document, almost as long as the width of my text. do you know about a latex command which can do that? i don't mind using an extra package.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

A very long arrow

Post by localghost »

You could use the standard picture environment and draw a vector or use the pgf/tikZ package and do the according thing.


Best regards
Thorsten¹
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

A very long arrow

Post by gmedina »

Another option would be to use the \xrightarrow or \xleftarrow comands provided by the amsmath package, as the following example suggests:

Code: Select all

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\[ \xrightarrow{\hspace*{3cm}} \]

\[ \xrightarrow{\hspace*{8cm}} \]

\[ \xrightarrow{\hspace*{10cm}} \]

\[ \xleftarrow{\hspace*{2cm}} \]

\[ \xleftarrow{\hspace*{7cm}} \]

\[ \xleftarrow{\hspace*{11cm}} \]

\end{document} 
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Stefanie
Posts: 25
Joined: Fri Apr 04, 2008 2:39 pm

Re: A very long arrow

Post by Stefanie »

thank you gmedina, that was exactly what i was looking for. tikz and the picture environment are too complicated for what i had in mind (and difficult to get right). this solution is much quicker.
diazdeus
Posts: 32
Joined: Fri Sep 28, 2018 9:34 pm

A very long arrow

Post by diazdeus »

I need also long arrows, left and right, to put a broken line in up of a table. That's my solution:

Code: Select all

\renewcommand{\arraystretch}{1.3}
\begin{table}[!h]
\begin{center}
\caption{Secuencia de emisiones}
\hspace*{-8pt}$\xleftarrow{\hspace*{2.6cm}}\textrm{10 segundos}\xrightarrow{\hspace*{2.6cm}}$  
\begin{tabular}{c|cccccccc|c}
\toprule
\textbf{Estación} & \textbf{0,9} & \textbf{1,0} & \textbf{1,1} & \textbf{1,2} & \textbf{1,1} & \textbf{0,9} & \textbf{1,2} & \textbf{1,0} & \textbf{Situación}\\
\hline
\textbf{A} & 10,2 & 13,6 & 11,33 & & & 11,05 & & & Noruega\\
\textbf{B} & & 10,2 & 13,6 & 11,33 & & & 11,05 & & Liberia\\
\textbf{C} & & & 10,2 & 13,6 & 11,33 & & & 11,05 & Hawaii\\
\textbf{D} & 11,05 & & & 10,2 & 13,6 & 11,33 & & &  EE.UU.\\
\textbf{E} & & 11,05 & & & 10,2 & 13,6 & 11,33 & & I. Reunion\\
\textbf{F} & & & 11,05 & & & 10,2 & 13,6 & 11,33 & Argentina\\
\textbf{G} & 11,33 & & & 11,05 & & & 10,2 & 13,6 & Australia\\
\textbf{H} & 13,6 & 11,33 & & & 11,05 & & & 10,2 & Japón\\
\bottomrule
\multicolumn{1}{c}{} & \multicolumn{8}{|c|}{Intervalos entre emisión 0,2 segundos} & \\[-2pt]
\cmidrule{2-9}
\end{tabular}
\end{center}
\end{table}
The packages amsmath and booktabs are needed.
Post Reply