5

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.

8

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

  • Thanks! I've added a link to this answer to the textpos documentation. – Norman Gray Feb 24 '15 at 14:27
  • Why yshift 13pt and xshift 4pt? – CrabMan Feb 21 '18 at 15:01

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.