3

Is there a way to draw a horizontal line across a page at the halfway mark, without changing the text at all?

I've got to write a document that is one and a half pages long. I've been trying to measure what half a page is without having to print it out and use a ruler each time, then realized there is probably a way to just print a line on each page, so I can see where half a page is. However, how do I specify to put this line at the 1/2 way mark, and not change the text layout at all?

Canageek
  • 17,935
  • 2
    I'd recommend just using tikz, look up remember picture, overlay and the current page page note. Btw, half a page ought to refer to half the height of the current text block which is often not the same as the physical middle of the page. – daleif Dec 03 '15 at 19:26

2 Answers2

5
\documentclass{article}
\usepackage{eso-pic}
\usepackage{blindtext}
\AddToShipoutPictureBG{%
    \AtTextCenter{\hspace{-0.5\textwidth}\rule{\textwidth}{0.5pt}}}

\begin{document}
\blinddocument
\end{document}

or

\AddToShipoutPictureBG{%
    \AtTextCenter{\hspace{-0.6\textwidth}\rule{1.2\textwidth}{0.5pt}}}

enter image description here

3

using my answer at What are the ways to position things absolutely on the page?

\documentclass{article}
\usepackage{everypage}
\usepackage{xcolor}
\usepackage{lipsum}
% THESE ARE LaTeX DEFAULTS; CAN CHANGE IF NEEDED.
\def\PageTopMargin{1in}
\def\PageLeftMargin{1in}
\newcommand\atxy[3]{%
 \AddThispageHook{\smash{\hspace*{\dimexpr-\PageLeftMargin-\hoffset+#1\relax}%
  \raisebox{\dimexpr\PageTopMargin+\voffset-#2\relax}{\textcolor{red}{#3}}}}}
% VERIFIED THAT SETTING \hoffset AND \voffset DO NOT BREAK SOLUTION.
%\hoffset=0.4in
%\voffset=0.2in
\begin{document}
\lipsum[1]
\atxy{0in}{.5\paperheight}{\rule{\paperwidth}{1pt}}
\end{document}