Debian Codegraph @

texmf-dist/tex/latex/tikzpagenodes/tikzpagenodes.sty

raw
1 %% Copyright (C) 2011-2012 by Martin Scharrer <[email protected]>
2 %% ----------------------------------------------------------------------
3 %% This work may be distributed and/or modified under the
4 %% conditions of the LaTeX Project Public License, either version 1.3
5 %% of this license or (at your option) any later version.
6 %% The latest version of this license is in
7 %% http://www.latex-project.org/lppl.txt
8 %% and version 1.3 or later is part of all distributions of LaTeX
9 %% version 2005/12/01 or later.
10 %%
11 %% This work has the LPPL maintenance status `maintained'.
12 %%
13 %% The Current Maintainer of this work is Martin Scharrer.
14 %%
15 %% This work consists of the files tikzpagenodes.dtx and tikzpagenodes.ins
16 %% and the derived filebase tikzpagenodes.sty.
17 %%
18 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
19 \ProvidesPackage{tikzpagenodes}[%
20 2012/09/16
21 v1.1
22 Special PGF/TikZ nodes for areas of the page]
23 \RequirePackage{tikz}
24 \RequirePackage{ifoddpage}
25 \tikzset{every picture/.append style={execute at begin picture={%
26 \ifpgfrememberpicturepositiononpage
27 \checkoddpage
28 \fi
29 }}}
30 \def\currentsidemargin{\ifoddpageoroneside\oddsidemargin\else\evensidemargin\fi}%
31 \def\current@textarea@left{(1in+\hoffset+\currentsidemargin)}
32 \def\current@textarea@top{(1in+\voffset+\topmargin+\headheight+\headsep)}
33 \def\@newtikzpagenode#1{%
34 \expandafter\let\csname pgf@sh@ns@#1\expandafter\endcsname\csname pgf@sh@ns@current page\endcsname
35 \expandafter\let\csname pgf@sh@nt@#1\expandafter\endcsname\csname pgf@sh@nt@current page\endcsname
36 \expandafter\let\csname pgf@sh@pi@#1\expandafter\endcsname\csname pgf@sh@pi@current page\endcsname
37 \expandafter\def\csname pgf@sh@np@#1\endcsname
38 }
39 \@newtikzpagenode{current page text area}{%
40 \def\southwest{\pgfpoint{\current@textarea@left}{\paperheight-\current@textarea@top-\textheight}}%
41 \def\northeast{\pgfpoint{\current@textarea@left+\textwidth}{\paperheight-\current@textarea@top}}%
42 }
43 \@newtikzpagenode{current page marginpar area}{%
44 \def\southwest{\pgfpoint
45 {\current@textarea@left\ifoddpageoroneside+\textwidth+\marginparsep\else-\marginparsep-\marginparwidth\fi}%
46 {\paperheight-\current@textarea@top-\textheight}%
47 }%
48 \def\northeast{\pgfpoint
49 {\current@textarea@left\ifoddpageoroneside+\textwidth+\marginparsep+\marginparwidth\else-\marginparsep\fi}%
50 {\paperheight-\current@textarea@top}%
51 }%
52 }
53 \@newtikzpagenode{current page header area}{%
54 \def\southwest{\pgfpoint{\current@textarea@left}{\paperheight-\current@textarea@top+\headsep}}%
55 \def\northeast{\pgfpoint{\current@textarea@left+\textwidth}{\paperheight-\current@textarea@top+\headsep+\headheight}}%
56 }
57 \@newtikzpagenode{current page footer area}{%
58 \def\southwest{\pgfpoint{\current@textarea@left}{\paperheight-\current@textarea@top-\textheight-\footskip}}%
59 \def\northeast{\pgfpoint{\current@textarea@left+\textwidth}{\paperheight-\current@textarea@top-\textheight-\footskip+\headheight}}%
60 }
61 \@newtikzpagenode{current page column 1 area}{%
62 \def\southwest{\pgfpoint{\current@textarea@left}{\paperheight-\current@textarea@top-\textheight}}%
63 \def\northeast{\pgfpoint{\current@textarea@left+\columnwidth}{\paperheight-\current@textarea@top}}%
64 }
65 \@newtikzpagenode{current page column 2 area}{%
66 \def\southwest{\pgfpoint{\current@textarea@left+\columnwidth+\columnsep}{\paperheight-\current@textarea@top-\textheight}}%
67 \def\northeast{\pgfpoint{\current@textarea@left+2\columnwidth+\columnsep}{\paperheight-\current@textarea@top}}%
68 }
69 \@newtikzpagenode{current page column 3 area}{%
70 \def\southwest{\pgfpoint{\current@textarea@left+2\columnwidth+2\columnsep}{\paperheight-\current@textarea@top-\textheight}}%
71 \def\northeast{\pgfpoint{\current@textarea@left+3\columnwidth+2\columnsep}{\paperheight-\current@textarea@top}}%
72 }
73 \@newtikzpagenode{current page column 4 area}{%
74 \def\southwest{\pgfpoint{\current@textarea@left+3\columnwidth+3\columnsep}{\paperheight-\current@textarea@top-\textheight}}%
75 \def\northeast{\pgfpoint{\current@textarea@left+4\columnwidth+3\columnsep}{\paperheight-\current@textarea@top}}%
76 }
77 \@newtikzpagenode{current page column 5 area}{%
78 \def\southwest{\pgfpoint{\current@textarea@left+4\columnwidth+4\columnsep}{\paperheight-\current@textarea@top-\textheight}}%
79 \def\northeast{\pgfpoint{\current@textarea@left+5\columnwidth+4\columnsep}{\paperheight-\current@textarea@top}}%
80 }
81 \@newtikzpagenode{current page column 6 area}{%
82 \def\southwest{\pgfpoint{\current@textarea@left+5\columnwidth+5\columnsep}{\paperheight-\current@textarea@top-\textheight}}%
83 \def\northeast{\pgfpoint{\current@textarea@left+6\columnwidth+5\columnsep}{\paperheight-\current@textarea@top}}%
84 }
85 \@newtikzpagenode{current page column 7 area}{%
86 \def\southwest{\pgfpoint{\current@textarea@left+6\columnwidth+6\columnsep}{\paperheight-\current@textarea@top-\textheight}}%
87 \def\northeast{\pgfpoint{\current@textarea@left+7\columnwidth+6\columnsep}{\paperheight-\current@textarea@top}}%
88 }
89 \@newtikzpagenode{current page column 8 area}{%
90 \def\southwest{\pgfpoint{\current@textarea@left+7\columnwidth+7\columnsep}{\paperheight-\current@textarea@top-\textheight}}%
91 \def\northeast{\pgfpoint{\current@textarea@left+8\columnwidth+7\columnsep}{\paperheight-\current@textarea@top}}%
92 }
93 \@newtikzpagenode{current page column 9 area}{%
94 \def\southwest{\pgfpoint{\current@textarea@left+8\columnwidth+8\columnsep}{\paperheight-\current@textarea@top-\textheight}}%
95 \def\northeast{\pgfpoint{\current@textarea@left+9\columnwidth+8\columnsep}{\paperheight-\current@textarea@top}}%
96 }
97 \@newtikzpagenode{current page column 10 area}{%
98 \def\southwest{\pgfpoint{\current@textarea@left+9\columnwidth+9\columnsep}{\paperheight-\current@textarea@top-\textheight}}%
99 \def\northeast{\pgfpoint{\current@textarea@left+10\columnwidth+9\columnsep}{\paperheight-\current@textarea@top}}%
100 }
101 \endinput
102 %%
103 %% End of file `tikzpagenodes.sty'.