From e9f04505a09f012779b28101d16874ae45805679 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 16 Sep 2011 22:36:25 +0000 Subject: new tikz package tikzpagenodes (16sep11) git-svn-id: svn://tug.org/texlive/trunk@23984 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/tikzpagenodes/tikzpagenodes.sty | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/tikzpagenodes/tikzpagenodes.sty (limited to 'Master/texmf-dist/tex/latex/tikzpagenodes') 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'. -- cgit v1.2.3