4

I wish to have a vertical arrows from the top of the page to the text, with the length of the arrow adjusted automaticall (like vertical fill).

Please advise.

  • If the answer below solved your problem, please mark it as 'accepted'. – Sean Allred Aug 2 '15 at 3:17
5

You can use TikZ:

\documentclass{article}
\usepackage[a6paper]{geometry}
\usepackage{tikz}
\usepackage{lipsum}

\newcounter{myarr}
\newcommand\VArrow[1][]{%
  \stepcounter{myarr}%
  \begin{tikzpicture}[remember picture, overlay]
  \coordinate (\themyarr);
  \draw[red,thick,->,#1] (\themyarr|-current page.north) -- (\themyarr);
  \end{tikzpicture}
}
\begin{document}

Some test text\VArrow and some more text goes here
\lipsum[2]
And now some more text to draw another arrow.\VArrow[blue,ultra thick,-latex]

\end{document}

enter image description here

The optional argument for \VArrow allows to pass options to the \draw command internally used to draw the arrow.

Since some calculations are internally performed. two or three runs are necessary for the code to stabilize.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.