Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How to create a horizontal line over the whole document exactly at the middle of the paper? I would like this line to be over all other objects previously created and placed, to get the effect of cutting the whole document by half with a horizontal line. Is there an easy way to add this in?

share|improve this question
    
Do you want it as a watermark, overlapping the text area? Or should it divide the text area in two? This could help: tex.stackexchange.com/q/41150/14757 or tex.stackexchange.com/a/41153/14757 –  Sigur May 21 '13 at 1:04
    
What happens if an object is 'split' by this line? Should there be whitespace to either side of the 'split' object (as if it had been 'cut' by this line)? Is there an image you can point to that will help us visualize what you mean? –  jon May 21 '13 at 1:07
    
It's much simpler. Imagine drawing this line on the printed page with a ruler. –  Vladimir May 21 '13 at 1:12
    
@Vladimir, see my suggestion below. –  Sigur May 21 '13 at 1:13
add comment

1 Answer 1

Adapting this solution, if the line should overlap the text.

\documentclass{article}
\usepackage{lipsum} % dummy text
\usepackage{tikz}
\usepackage{eso-pic}

\AddToShipoutPicture{%
    \begin{tikzpicture}[overlay,remember picture]
        \draw[line width=1pt,red]
              (current page.east) -- (current page.west);
    \end{tikzpicture}%
}

\begin{document}
 \lipsum 
\end{document}

If you change the anchors you can obtains easily other lines. For example (current page.south east) -- (current page.north west);

Or another kind of rules.

(current page.west)       -- (current page.north) 
(current page.south west) -- (current page.north east)
(current page.south)      -- (current page.east)      ;

enter image description here enter image description here enter image description here

share|improve this answer
add comment

Your Answer

 
discard

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.