%% %% This is file `vgrid.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% vgrid.dtx (with options: `package') %% %% IMPORTANT NOTICE: %% %% For the copyright see the source file. %% %% Any modified versions of this file must be renamed %% with new filenames distinct from vgrid.sty. %% %% For distribution of the original source see the terms %% for copying and modification in the file vgrid.dtx. %% %% This generated file may be distributed as long as the %% original source files, as listed above, are part of the %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{vgrid} [2013/12/20 0.1 Overlays a vertical grid] \RequirePackage{everypage} \RequirePackage{tikz} \RequirePackage{ifoddpage} \newlength\vgrid@l \setlength\vgrid@l{\baselineskip} \newlength\vgrid@y \AddEverypageHook{ \def\@csm{\ifoddpageoroneside\oddsidemargin\else\evensidemargin\fi} \def\@left{\hoffset+\@csm} \def\@right{\@left+\textwidth} \def\@top{-\voffset-\topmargin-\headheight-\headsep} \def\@gridline{\draw [thin, gray]} \begin{tikzpicture}[overlay] \def\y{\@top-\vgrid@y} \@gridline (\@left, \@top) -- (\@left, \@top-\textheight); \@gridline (\@right, \@top) -- (\@right, \@top-\textheight); \setlength\vgrid@y{0pt} \@whiledim\vgrid@y<\textheight\do{ \@gridline (\@left, \y) -- (\@right, \y); \addtolength{\vgrid@y}{\vgrid@l} } \@gridline (\@left, \y) -- (\@right, \y); \end{tikzpicture} } \endinput %% %% End of file `vgrid.sty'.