The Vgrid Package: Scott Lawrence 0.1 From 2013/12/20
The Vgrid Package: Scott Lawrence 0.1 From 2013/12/20
Introduction
The vgrid package overlays a grid intended to help the author enforce vertical
rhythm on each page. The spacing of the grid is taken from \baselineskip, with
the first line at the top of the text area.
Note that vgrid itself does not change any spacing other packages (or careful font settings) must be used to achieve vertical rhythm. This document, for
example, can be clearly seen to not have vertical rhythm.
Usage
Implementation
\RequirePackage{everypage}
\RequirePackage{tikz}
3 \RequirePackage{ifoddpage}
4 \newlength\vgrid@l \setlength\vgrid@l{\baselineskip}
5 \newlength\vgrid@y
6 \AddEverypageHook{
1
2
\setlength\vgrid@y{0pt}
\@whiledim\vgrid@y<\textheight\do{
18 \@gridline (\@left, \y) -- (\@right, \y);
19 \addtolength{\vgrid@y}{\vgrid@l}
20 }
21 \@gridline (\@left, \y) -- (\@right, \y);
22 \end{tikzpicture}
23 }
16
17