TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need on one specific page a line from the very top to the end of the page (it is for folding).

Everything I tried so far stopped at the head/foot room.

Someone got an idea?

share|improve this question
Please post what you have tried so far and we will correct it for you. We do not even know your documentclass and would have to guess around. You should always try to minimize the work, the helpers have to do for you. Just an advice. Welcome to the page, btw. – LaRiFaRi Aug 29 '14 at 14:27
I tryed some shananigans with tables, but they dont override the header and fooder. Also i tried a whole Box over the page, stolen this form the method of puting source code in my text. There i could set borders. But with the answers from Steven and Harish i am 100% sadisvied. @ Turion, thanks for the editing, my english isnt that good. – Fulli Sep 1 '14 at 6:55
Glad to hear. It would be good, if you mark your preferred answer by klicking on the check mark on the left. This will close this issue as it has been resolved. Thanks. – LaRiFaRi Sep 1 '14 at 7:08
up vote 3 down vote accepted

Specializing my answer from What are the ways to position things absolutely on the page?, this MWE sets up the line on page two, because that is where the \atxy was invoked. The line is 6 inches from the left paper edge, as given in the \atxy arguments.


enter image description here

share|improve this answer
\tikz[overlay,remember picture]\draw[<->,red,dashed] ([xshift=3cm]current page.north west)-- ([xshift=3cm]current page.south west);

share|improve this answer
I dont know why but this solution didnt work in my document. – Fulli Sep 1 '14 at 7:01
@Fulli: Well it works in my example (after two compilations). So you will have to find out what's different in your document. – Ulrike Fischer Sep 1 '14 at 7:35
@ Ulrike: could it be the documentclass? i write in a paper not an article? – Fulli Sep 1 '14 at 7:46
@Fulli: I won't try to guess around without any information. Make a complete minimal example that demonstrates your problem and show it along with the log-file. Create a new question or add the informations to your question above. – Ulrike Fischer Sep 1 '14 at 7:52

Like this?


Some text

Adjust the value 4cm in \LenToUnit{4cm} as you desire.

enter image description here

share|improve this answer
9 second difference ;-) – Ulrike Fischer Aug 29 '14 at 15:10
@UlrikeFischer I have a different method ;-) – Harish Kumar Aug 29 '14 at 16:12

Here is a variation/edit on Ulrike's solution (so please give her the tick!) to get the line to go down the centre of the page.

\tikz[overlay,remember picture]\draw[red,dashed](current page.north)--(current page.south);

share|improve this answer
(current page.north) -- (current page.south)? – Manuel Aug 29 '14 at 15:37
@Manuel I thought this would work too but it doesn't: Package PGF Math Error: Unknown function north' (in 'north ').` – Andrew Aug 29 '14 at 15:39
(current page.90) -- (current page.270)? I can't compile right now. – Manuel Aug 29 '14 at 15:41
@Manuel I am very confused as it is working now... Will edit. I'm sure that I tried this earlier too before resorting to using the calc library. Whatever... – Andrew Aug 29 '14 at 15:43
Ah, space matters here: when I first tried this I had (current page.north ) and the space after north leads to the error above... – Andrew Aug 29 '14 at 15:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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