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