summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/vgrid/vgrid.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/vgrid/vgrid.sty')
-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'.