From cf73759c7df7a7750abb011e26039e3b0b2cee5a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 18 Sep 2012 23:41:02 +0000 Subject: tikzpagenodes (16sep12) git-svn-id: svn://tug.org/texlive/trunk@27723 c570f23f-e606-0410-a88d-b1316a301751 --- .../doc/latex/tikzpagenodes/tikzpagenodes.pdf | Bin 141475 -> 251196 bytes .../source/latex/tikzpagenodes/tikzpagenodes.dtx | 177 +++++++++++++++------ .../source/latex/tikzpagenodes/tikzpagenodes.ins | 3 +- .../tex/latex/tikzpagenodes/tikzpagenodes.sty | 94 ++++++++--- 4 files changed, 206 insertions(+), 68 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/tikzpagenodes/tikzpagenodes.pdf b/Master/texmf-dist/doc/latex/tikzpagenodes/tikzpagenodes.pdf index 9650f2be588..2beb7a7aeb7 100644 Binary files a/Master/texmf-dist/doc/latex/tikzpagenodes/tikzpagenodes.pdf and b/Master/texmf-dist/doc/latex/tikzpagenodes/tikzpagenodes.pdf differ diff --git a/Master/texmf-dist/source/latex/tikzpagenodes/tikzpagenodes.dtx b/Master/texmf-dist/source/latex/tikzpagenodes/tikzpagenodes.dtx index 94fd9b07c86..4192608102c 100644 --- a/Master/texmf-dist/source/latex/tikzpagenodes/tikzpagenodes.dtx +++ b/Master/texmf-dist/source/latex/tikzpagenodes/tikzpagenodes.dtx @@ -1,29 +1,38 @@ % \iffalse meta-comment -% -% Copyright (C) 2011 by Martin Scharrer -% --------------------------------------------------------------------------- -% 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. -% +%<=*COPYRIGHT> +%% Copyright (C) 2011-2012 by Martin Scharrer +%% ---------------------------------------------------------------------- +%% 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. +%% +%<=/COPYRIGHT> % \fi % % \iffalse %<*driver> -\ProvidesFile{tikzpagenodes.dtx}[2011/09/15 v1.0 DTX file for tikzpagenodes package] +\ProvidesFile{tikzpagenodes.dtx}[% +%<=*DATE> + 2012/09/16 +%<=/DATE> +%<=*VERSION> + v1.1 +%<=/VERSION> + DTX file for tikzpagenodes package] \documentclass{ydoc} -\usepackage{tikzpagenodes} +\GetFileInfo{tikzpagenodes.dtx} +\usepackage{tikzpagenodes}[\filedate] \EnableCrossrefs \CodelineIndex \RecordChanges @@ -35,7 +44,7 @@ % % \fi % -% \CheckSum{188} +% \CheckSum{308} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -55,6 +64,7 @@ % % % \changes{v1.0}{2011/09/15}{First version.} +% \changes{v1.1}{2012/09/16}{Corrected positions of 'marginpar area' nodes.} % % \DoNotIndex{\newcommand,\newenvironment} % @@ -62,9 +72,7 @@ % \GetFileInfo{tikzpagenodes.dtx} % \title{The \textsf{tikzpagenodes} package} % \author{Martin Scharrer\\ \url{martin@scharrer.me}} -% \makeatletter -% \def\@homepage{\url{http://www.ctan.org/pkg/tikzpagenodes}\\[\medskipamount]\url{https://bitbucket.org/martin_scharrer/tikzpagenodes}} -% \makeatother +% \repository{https://bitbucket.org/martin_scharrer/tikzpagenodes} % % \maketitle % \section{Introduction} @@ -142,13 +150,19 @@ % \iffalse %<*tikzpagenodes.sty> % \fi -% \subsection{Package Header} -% % \begin{macrocode} -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{tikzpagenodes}[2011/09/15 v1.0 Special PGF/TikZ nodes for areas of the page] +% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{tikzpagenodes}[% +% +% +%<*DRIVER> + 2099/01/01 develop +% + Special PGF/TikZ nodes for areas of the page] % \end{macrocode} % +% % \begin{macrocode} \RequirePackage{tikz} \RequirePackage{ifoddpage} @@ -191,58 +205,127 @@ % \end{macrocode} % \end{macro} % +% \subsection{Node Definition Macro} +% Most required macros can be |\let| to the |current page| node. +% \begin{macrocode} +\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 +} +% \end{macrocode} % % \subsection{Current Page Text Area Node} % \begin{macrocode} -\expandafter\def\csname pgf@sh@ns@current page text area\endcsname{rectangle} -\expandafter\def\csname pgf@sh@np@current page text area\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}}% } -\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 % \end{macrocode} % % % \subsection{Current Page Marginpar Area Node} % \begin{macrocode} -\expandafter\def\csname pgf@sh@ns@current page marginpar area\endcsname{rectangle} -\expandafter\def\csname pgf@sh@np@current page marginpar area\endcsname{% +\@newtikzpagenode{current page marginpar area}{% \def\southwest{\pgfpoint - {\current@textarea@left\ifoddpageoroneside+\textwidth+\marginparsep\else-\marginparsep\fi}% + {\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-\marginparwidth\fi}% + {\current@textarea@left\ifoddpageoroneside+\textwidth+\marginparsep+\marginparwidth\else-\marginparsep\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 % \end{macrocode} % % % \subsection{Current Page Header Area Node} % \begin{macrocode} -\expandafter\def\csname pgf@sh@ns@current page header area\endcsname{rectangle} -\expandafter\def\csname pgf@sh@np@current page header area\endcsname{% +\@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}}% } -\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 % \end{macrocode} % % % \subsection{Current Page Footer Area Node} % \begin{macrocode} -\expandafter\def\csname pgf@sh@ns@current page footer area\endcsname{rectangle} -\expandafter\def\csname pgf@sh@np@current page footer area\endcsname{% +\@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}}% } -\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 +% \end{macrocode} +% +% \subsection{Current Page Column Areas} +% \begin{macrocode} +\@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}}% +} +% \end{macrocode} +% +% \begin{macrocode} +\@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}}% +} +% \end{macrocode} +% +% \begin{macrocode} +\@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}}% +} +% \end{macrocode} +% +% \begin{macrocode} +\@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}}% +} +% \end{macrocode} +% +% \begin{macrocode} +\@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}}% +} +% \end{macrocode} +% +% \begin{macrocode} +\@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}}% +} +% \end{macrocode} +% +% \begin{macrocode} +\@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}}% +} +% \end{macrocode} +% +% \begin{macrocode} +\@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}}% +} +% \end{macrocode} +% +% \begin{macrocode} +\@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}}% +} +% \end{macrocode} +% +% \begin{macrocode} +\@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}}% +} % \end{macrocode} % % \iffalse @@ -250,4 +333,4 @@ % \fi % % \Finale -\endinput +% \endinput diff --git a/Master/texmf-dist/source/latex/tikzpagenodes/tikzpagenodes.ins b/Master/texmf-dist/source/latex/tikzpagenodes/tikzpagenodes.ins index 48da9378fdb..ec542b22e46 100644 --- a/Master/texmf-dist/source/latex/tikzpagenodes/tikzpagenodes.ins +++ b/Master/texmf-dist/source/latex/tikzpagenodes/tikzpagenodes.ins @@ -1,9 +1,10 @@ % See file 'tikzpagenodes.dtx' for copyright and licence. % -\input docstrip.tex +\input ydocstrip.tex \keepsilent \askforoverwritefalse \generate{% \file{tikzpagenodes.sty}{\nopreamble\from{tikzpagenodes.dtx}{tikzpagenodes.sty}}% } \endbatchfile +% vim: ft=tex diff --git a/Master/texmf-dist/tex/latex/tikzpagenodes/tikzpagenodes.sty b/Master/texmf-dist/tex/latex/tikzpagenodes/tikzpagenodes.sty index 781b6096ad5..a1780c5f8f8 100644 --- a/Master/texmf-dist/tex/latex/tikzpagenodes/tikzpagenodes.sty +++ b/Master/texmf-dist/tex/latex/tikzpagenodes/tikzpagenodes.sty @@ -1,5 +1,25 @@ -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{tikzpagenodes}[2011/09/15 v1.0 Special PGF/TikZ nodes for areas of the page] +%% Copyright (C) 2011-2012 by Martin Scharrer +%% ---------------------------------------------------------------------- +%% 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={% @@ -10,40 +30,74 @@ \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\@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}}% } -\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{% +\@newtikzpagenode{current page marginpar area}{% \def\southwest{\pgfpoint - {\current@textarea@left\ifoddpageoroneside+\textwidth+\marginparsep\else-\marginparsep\fi}% + {\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-\marginparwidth\fi}% + {\current@textarea@left\ifoddpageoroneside+\textwidth+\marginparsep+\marginparwidth\else-\marginparsep\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{% +\@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}}% } -\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{% +\@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}}% } -\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 +\@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'. -- cgit v1.2.3