7

Is it possible to draw a (dotted) horizontal rule at the middle of the page (same distance from the top as from the bottom) independent of the rest of the text (perhaps in some way overlayed over the text)?

I just want it as a help line for a special purpose, it will removed in the final version of the text so it doesn't matter if it overlays text.

11

Here's one possibility using the background package:

\documentclass{article}
\usepackage[a6paper]{geometry}% just for the example
\usepackage{background}
\usepackage{lipsum}% just to generate text for the example

\backgroundsetup{
  scale=1,
  angle=0,
  color=blue,
  contents={\tikz\draw[ultra thick,dotted] (current page.west) -- (current page.east);}
}

\begin{document}

\lipsum[1-3]

\end{document}

enter image description here

To make the line disappear, you can simply change

\usepackage{background}

to

\usepackage[pages=some]{background}

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.