summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tikzpagenodes/tikzpagenodes.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-09-16 22:36:25 +0000
committerKarl Berry <karl@freefriends.org>2011-09-16 22:36:25 +0000
commite9f04505a09f012779b28101d16874ae45805679 (patch)
tree9092cb3fc17a1a4068f678760b10c32982912262 /Master/texmf-dist/tex/latex/tikzpagenodes/tikzpagenodes.sty
parent6d95b4a2c1bbdaea1a3802c822808f476ac5703b (diff)
new tikz package tikzpagenodes (16sep11)
git-svn-id: svn://tug.org/texlive/trunk@23984 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tikzpagenodes/tikzpagenodes.sty')
-rw-r--r--Master/texmf-dist/tex/latex/tikzpagenodes/tikzpagenodes.sty49
1 files changed, 49 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/tikzpagenodes/tikzpagenodes.sty b/Master/texmf-dist/tex/latex/tikzpagenodes/tikzpagenodes.sty
new file mode 100644
index 00000000000..781b6096ad5
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/tikzpagenodes/tikzpagenodes.sty
@@ -0,0 +1,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'.