[Tex/LaTex] grid for textpos layout

textpos

This could be a too obvious question.

I'm trying to lay things out on a page and I'm having to recompile a lot. I'd like to layout a grid using \TPHorizmodule and \TPVertmodule (from the textpos package) as the reference which will help me lay out my document. I've seen some 'grid' suggestions but I'm struggling to understand them.

Any help gratefully received.

Best Answer

Here's one possibility using TikZ:

\documentclass{article}
\usepackage{textpos}
\usepackage{tikz}
\usepackage{lipsum}% just to generate text for the example

\newcommand\Mygrid{%
\tikz[
  remember picture,
  overlay,
  yscale=-1,
  xstep=\TPHorizModule,ystep=\TPVertModule,
  yshift=13pt,xshift=4pt]
  \draw (current page.north west) grid (current page.south east);}

\begin{document}
\Mygrid
\lipsum[1-5]
\end{document}

enter image description here

Related Question