summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tikzpagenodes/tikzpagenodes.sty
blob: 781b6096ad53b47a0da176b9c171b591cc3e31d3 (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
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{tikzpagenodes}[2011/09/15 v1.0 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)}
\expandafter\def\csname pgf@sh@ns@current page text area\endcsname{rectangle}
\expandafter\def\csname pgf@sh@np@current page text area\endcsname{%
    \def\southwest{\pgfpoint{\current@textarea@left}{\paperheight-\current@textarea@top-\textheight}}%
    \def\northeast{\pgfpoint{\current@textarea@left+\textwidth}{\paperheight-\current@textarea@top}}%
}
\expandafter\let\csname pgf@sh@nt@current page text area\expandafter\endcsname\csname pgf@sh@nt@current page\endcsname
\expandafter\let\csname pgf@sh@pi@current page text area\expandafter\endcsname\csname pgf@sh@pi@current page\endcsname
\expandafter\def\csname pgf@sh@ns@current page marginpar area\endcsname{rectangle}
\expandafter\def\csname pgf@sh@np@current page marginpar area\endcsname{%
    \def\southwest{\pgfpoint
        {\current@textarea@left\ifoddpageoroneside+\textwidth+\marginparsep\else-\marginparsep\fi}%
        {\paperheight-\current@textarea@top-\textheight}%
    }%
    \def\northeast{\pgfpoint
        {\current@textarea@left\ifoddpageoroneside+\textwidth+\marginparsep+\marginparwidth\else-\marginparsep-\marginparwidth\fi}%
        {\paperheight-\current@textarea@top}%
    }%
}
\expandafter\let\csname pgf@sh@nt@current page marginpar area\expandafter\endcsname\csname pgf@sh@nt@current page\endcsname
\expandafter\let\csname pgf@sh@pi@current page marginpar area\expandafter\endcsname\csname pgf@sh@pi@current page\endcsname
\expandafter\def\csname pgf@sh@ns@current page header area\endcsname{rectangle}
\expandafter\def\csname pgf@sh@np@current page header area\endcsname{%
    \def\southwest{\pgfpoint{\current@textarea@left}{\paperheight-\current@textarea@top+\headsep}}%
    \def\northeast{\pgfpoint{\current@textarea@left+\textwidth}{\paperheight-\current@textarea@top+\headsep+\headheight}}%
}
\expandafter\let\csname pgf@sh@nt@current page header area\expandafter\endcsname\csname pgf@sh@nt@current page\endcsname
\expandafter\let\csname pgf@sh@pi@current page header area\expandafter\endcsname\csname pgf@sh@pi@current page\endcsname
\expandafter\def\csname pgf@sh@ns@current page footer area\endcsname{rectangle}
\expandafter\def\csname pgf@sh@np@current page footer area\endcsname{%
    \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}}%
}
\expandafter\let\csname pgf@sh@nt@current page footer area\expandafter\endcsname\csname pgf@sh@nt@current page\endcsname
\expandafter\let\csname pgf@sh@pi@current page footer area\expandafter\endcsname\csname pgf@sh@pi@current page\endcsname
\endinput
%%
%% End of file `tikzpagenodes.sty'.