summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/vgrid
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-12-20 22:02:29 +0000
committerKarl Berry <karl@freefriends.org>2013-12-20 22:02:29 +0000
commit686feafdfa728f8f337210a65b380f168e4a68fe (patch)
treee63955e98d88bfce4d24808088be0da1cb04c974 /Master/texmf-dist/tex/latex/vgrid
parent1bacfc6b28763adb12f6a9aadc573c6012a5c14c (diff)
vgrid (20dec13)
git-svn-id: svn://tug.org/texlive/trunk@32457 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/vgrid')
-rw-r--r--Master/texmf-dist/tex/latex/vgrid/vgrid.sty53
1 files changed, 53 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/vgrid/vgrid.sty b/Master/texmf-dist/tex/latex/vgrid/vgrid.sty
new file mode 100644
index 00000000000..d2d8ee5b6de
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/vgrid/vgrid.sty
@@ -0,0 +1,53 @@
+%%
+%% 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'.