From 971a4c28d717ab58e5bd3394f497e1cede329128 Mon Sep 17 00:00:00 2001 From: Manuel Pégourié-Gonnard Date: Fri, 20 Nov 2009 10:31:02 +0000 Subject: eso-pic update (2009/10/07 v2.0a) git-svn-id: svn://tug.org/texlive/trunk@16100 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/eso-pic/README | 17 -- .../doc/latex/eso-pic/eso-article-test.tex | 34 +++ Master/texmf-dist/doc/latex/eso-pic/eso-ex1.tex | 2 +- Master/texmf-dist/doc/latex/eso-pic/eso-ex2.tex | 5 +- Master/texmf-dist/doc/latex/eso-pic/eso-ex3.tex | 11 +- Master/texmf-dist/doc/latex/eso-pic/eso-ex4.tex | 2 +- Master/texmf-dist/doc/latex/eso-pic/eso-ex5.tex | 8 +- .../doc/latex/eso-pic/eso-memoir-test.tex | 41 +++ Master/texmf-dist/doc/latex/eso-pic/eso-pic.pdf | Bin 148673 -> 260855 bytes Master/texmf-dist/source/latex/eso-pic/Makefile | 59 ----- Master/texmf-dist/source/latex/eso-pic/eso-pic.dtx | 285 +++++++++++++-------- Master/texmf-dist/source/latex/eso-pic/eso-pic.ins | 6 +- Master/texmf-dist/tex/latex/eso-pic/eso-pic.sty | 199 +++++++++----- Master/texmf-dist/tex/latex/eso-pic/showframe.sty | 50 ---- 14 files changed, 400 insertions(+), 319 deletions(-) delete mode 100644 Master/texmf-dist/doc/latex/eso-pic/README create mode 100644 Master/texmf-dist/doc/latex/eso-pic/eso-article-test.tex create mode 100644 Master/texmf-dist/doc/latex/eso-pic/eso-memoir-test.tex delete mode 100644 Master/texmf-dist/source/latex/eso-pic/Makefile delete mode 100644 Master/texmf-dist/tex/latex/eso-pic/showframe.sty (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/eso-pic/README b/Master/texmf-dist/doc/latex/eso-pic/README deleted file mode 100644 index 1d412f8f0da..00000000000 --- a/Master/texmf-dist/doc/latex/eso-pic/README +++ /dev/null @@ -1,17 +0,0 @@ - -The `eso-pic' package - -This package makes it easy to add some picture commands to every page. - - eso-pic.dtx -- the source file - eso-pic.ins -- unpack `eso-pic.dtx' with `tex eso-pic.ins' - eso-ex1.tex, - eso-ex2.tex, - eso-ex3.tex, - eso-ex4.tex, - eso-ex5.tex -- Some LaTeX examples - -To produce the documentation run eso-pic.dtx through LaTeX. - - Rolf Niepraschk - niepraschk@ptb.de diff --git a/Master/texmf-dist/doc/latex/eso-pic/eso-article-test.tex b/Master/texmf-dist/doc/latex/eso-pic/eso-article-test.tex new file mode 100644 index 00000000000..b35d69a4054 --- /dev/null +++ b/Master/texmf-dist/doc/latex/eso-pic/eso-article-test.tex @@ -0,0 +1,34 @@ + +\listfiles +\documentclass[a4paper,twoside]{article} + +\usepackage{eso-pic} +\usepackage{pict2e,showframe,xcolor} + +\AddToShipoutPicture{% + \AtPageLowerLeft{\circle*{40}}% + \AtPageUpperLeft{\circle*{40}}% + \AtPageCenter{\circle*{40}}% + \AtTextLowerLeft{\circle*{15}}% + \AtTextUpperLeft{\circle*{15}}% + \color{red}% + \AtStockLowerLeft{\circle*{20}}% + \AtStockUpperLeft{\circle*{20}}% + \AtStockCenter{\circle*{20}}% +} + +\begin{document} \Huge \bfseries + +\noindent +\hrulefill First Page\hrulefill +\vfill +\noindent +X \hfill X +\newpage +\noindent +\hrulefill Second Page\hrulefill +\vfill +\noindent +X \hfill X + +\end{document} diff --git a/Master/texmf-dist/doc/latex/eso-pic/eso-ex1.tex b/Master/texmf-dist/doc/latex/eso-pic/eso-ex1.tex index 8c4c78956df..98824b7f602 100644 --- a/Master/texmf-dist/doc/latex/eso-pic/eso-ex1.tex +++ b/Master/texmf-dist/doc/latex/eso-pic/eso-ex1.tex @@ -1,6 +1,6 @@ % file `eso-ex1.tex'; a framed background example -% Rolf Niepraschk, 2001-07-20, niepraschk@ptb.de +% Rolf Niepraschk, 2005-12-25, Rolf.Niepraschk@ptb.de \documentclass[a4paper]{article} \usepackage{eso-pic,calc} diff --git a/Master/texmf-dist/doc/latex/eso-pic/eso-ex2.tex b/Master/texmf-dist/doc/latex/eso-pic/eso-ex2.tex index eb1966ec604..2874ca477d0 100644 --- a/Master/texmf-dist/doc/latex/eso-pic/eso-ex2.tex +++ b/Master/texmf-dist/doc/latex/eso-pic/eso-ex2.tex @@ -1,10 +1,9 @@ % file `eso-ex2.tex'; an example for background pictures -% Rolf Niepraschk, 2002-07-27, niepraschk@ptb.de +% Rolf Niepraschk, 2005-12-25, Rolf.Niepraschk@ptb.de \listfiles \documentclass{article} -%\usepackage{eso-pic} \usepackage{eso-pic} \usepackage{graphicx} \usepackage[dvips]{geometry} @@ -13,7 +12,7 @@ % `rose.eps' from CTAN: macros/generic/boxedeps/ \newcommand\BackgroundPicture{% \put(0,0){% - \parbox[b][\paperheight]{\paperwidth}{% + \parbox[b][\paperheight]{\paperwidth}{% \vfill \centering \includegraphics[width=\paperwidth,height=\paperheight,% diff --git a/Master/texmf-dist/doc/latex/eso-pic/eso-ex3.tex b/Master/texmf-dist/doc/latex/eso-pic/eso-ex3.tex index fff4b73adc3..ccbb75f2b86 100644 --- a/Master/texmf-dist/doc/latex/eso-pic/eso-ex3.tex +++ b/Master/texmf-dist/doc/latex/eso-pic/eso-ex3.tex @@ -1,10 +1,11 @@ % file `eso-ex3.tex'; an example for import pages of another (pdf) document. +% This works only with `pdfTeX' (maybe `VTeX'?). % Based on an article from Andreas Matthias in d.c.t.t % % A much better solution is Andreas' package `pdfpages'. % -% Rolf Niepraschk, 2001/07/21, niepraschk@ptb.de +% Rolf Niepraschk, 2005-12-25, Rolf.Niepraschk@ptb.de \documentclass[a4paper]{article} \usepackage[pdftex]{graphicx}% @@ -16,15 +17,15 @@ {% \setcounter{thispdfpage}{#2}\setcounter{afterlastpdfpage}{#3+1}% \newpage - \whiledo{\value{thispdfpage} < \value{afterlastpdfpage}} + \whiledo{\value{thispdfpage} < \value{afterlastpdfpage}}% {% \AddToShipoutPicture* {% \put(0,0){% - \includegraphics[width=\paperwidth,height=\paperheight,% - keepaspectratio,page=\arabic{thispdfpage}]{#1}} + \includegraphics[width=\paperwidth,height=\paperheight,% + keepaspectratio,page=\arabic{thispdfpage}]{#1}}% } - \thispagestyle{empty}\mbox{}\newpage% + \thispagestyle{empty}\mbox{}\newpage \stepcounter{thispdfpage}% } } diff --git a/Master/texmf-dist/doc/latex/eso-pic/eso-ex4.tex b/Master/texmf-dist/doc/latex/eso-pic/eso-ex4.tex index 580fd062f21..fed7e016740 100644 --- a/Master/texmf-dist/doc/latex/eso-pic/eso-ex4.tex +++ b/Master/texmf-dist/doc/latex/eso-pic/eso-ex4.tex @@ -1,6 +1,6 @@ % file `eso-ex4.tex'; a framed text area example -% Rolf Niepraschk, 2002-09-03, niepraschk@ptb.de +% Rolf Niepraschk, 2005-12-25, Rolf.Niepraschk@ptb.de \listfiles\errorcontextlines=100 \documentclass[a4paper,twoside]{article} diff --git a/Master/texmf-dist/doc/latex/eso-pic/eso-ex5.tex b/Master/texmf-dist/doc/latex/eso-pic/eso-ex5.tex index 33b31c2a9e5..26c4f1033ba 100644 --- a/Master/texmf-dist/doc/latex/eso-pic/eso-ex5.tex +++ b/Master/texmf-dist/doc/latex/eso-pic/eso-ex5.tex @@ -1,8 +1,8 @@ % file `eso-ex5.tex'; background grid example -% Rolf Niepraschk, 2002-11-16, niepraschk@ptb.de +% Rolf Niepraschk, 2005-12-25, Rolf.Niepraschk@ptb.de -\listfiles +\listfiles\errorcontextlines=100 \documentclass[a4paper,twoside]{article} % a4paper = 210mm x 297mm = 596bp x 842bp = 8.27in x 11.69in % letterpaper = 215.9mm x 279.4mm = 612bp x 792bp = 8.5in x 11in @@ -12,11 +12,11 @@ \usepackage[dvips]{geometry} % `dvips', `pdfTeX' and `VTeX' should know the papersize. -\usepackage[colorgrid,gridunit=mm]{eso-pic} +\usepackage[colorgrid,gridunit=mm,texcoord]{eso-pic} %\usepackage[colorgrid,gridunit=in,subgridcolor=blue,texcoord]{eso-pic} %\usepackage[grid,gridunit=bp,subgridstyle=dotted]{eso-pic} -\newcommand{\cmd}[1]{\texttt{\symbol{`\\}#1}} +\newcommand*\cmd[1]{\texttt{\symbol{`\\}#1}} \AddToShipoutPicture{% \thicklines\normalfont\ttfamily\Large% diff --git a/Master/texmf-dist/doc/latex/eso-pic/eso-memoir-test.tex b/Master/texmf-dist/doc/latex/eso-pic/eso-memoir-test.tex new file mode 100644 index 00000000000..17343367b01 --- /dev/null +++ b/Master/texmf-dist/doc/latex/eso-pic/eso-memoir-test.tex @@ -0,0 +1,41 @@ +\errorcontextlines=100\relax +\listfiles +\documentclass[twoside,a4paper,showtrims]{memoir} +%------------------------------------ +\stockaiii +\setlength{\trimedge}{\stockwidth} +\addtolength{\trimedge}{-\paperwidth} +\setlength{\trimedge}{.25\trimedge} +\setlength{\trimtop}{\stockheight} +\addtolength{\trimtop}{-\paperheight} +\setlength{\trimtop}{.25\trimtop} +\checkandfixthelayout +%------------------------------------ +\usepackage{eso-pic} +\usepackage{pict2e,showframe} + +\AddToShipoutPicture{% + \AtPageLowerLeft{\circle*{40}}% + \AtPageUpperLeft{\circle*{40}}% + \AtTextLowerLeft{\circle*{15}}% + \AtTextUpperLeft{\circle*{15}}% + \AtStockLowerLeft{\circle*{40}}% + \AtStockUpperLeft{\circle*{40}}% + \AtStockCenter{\circle*{40}}% +} + +\begin{document} \Huge \bfseries + +\noindent +\hrulefill First Page\hrulefill +\vfill +\noindent +X \hfill X +\newpage +\noindent +\hrulefill Second Page\hrulefill +\vfill +\noindent +X \hfill X + +\end{document} diff --git a/Master/texmf-dist/doc/latex/eso-pic/eso-pic.pdf b/Master/texmf-dist/doc/latex/eso-pic/eso-pic.pdf index be806e8c194..3d38963ab8d 100644 Binary files a/Master/texmf-dist/doc/latex/eso-pic/eso-pic.pdf and b/Master/texmf-dist/doc/latex/eso-pic/eso-pic.pdf differ diff --git a/Master/texmf-dist/source/latex/eso-pic/Makefile b/Master/texmf-dist/source/latex/eso-pic/Makefile deleted file mode 100644 index 40c665fba6c..00000000000 --- a/Master/texmf-dist/source/latex/eso-pic/Makefile +++ /dev/null @@ -1,59 +0,0 @@ - -CWD = $(notdir $(PWD)) -HOMEDIR = $(PWD) - -EXAMPLE = eso-ex - -PACKAGE = eso-pic - -LATEX = elatex -PDFLATEX = pdfelatex - -ARCHNAME = $(PACKAGE)-$(shell echo `date +%y%m%d`).zip - -ALL = $(EXAMPLE)1.ps $(EXAMPLE)2.ps $(EXAMPLE)3.pdf $(EXAMPLE)4.ps \ - $(EXAMPLE)5.ps - -all : $(ALL) - -$(EXAMPLE)%.ps : $(EXAMPLE)%.dvi - dvips -Pwww $< -o $@ - -$(EXAMPLE)%.dvi : $(EXAMPLE)%.tex $(PACKAGE).sty - $(LATEX) $< - -$(EXAMPLE)%.pdf : $(EXAMPLE)%.tex $(PACKAGE).sty - $(PDFLATEX) $< - -$(PACKAGE).sty : $(PACKAGE).ins $(PACKAGE).dtx - echo -e "y\ny" | tex $< - -doc : $(PACKAGE).ps - -%.ps : %.dvi - dvips -Pwww $< -o $@ - -$(PACKAGE).dvi : $(PACKAGE).dtx - $(LATEX) $< - makeindex -s gglo.ist -o $(basename $<).gls $(basename $<).glo - $(LATEX) $< - -arch : - zip $(ARCHNAME) Makefile $(patsubst %.pdf,%.tex,$(ALL:.ps=.tex)) \ - $(PACKAGE).dtx $(PACKAGE).ins -x "*.zip" - @ echo; echo $(ARCHNAME); echo; - -clean : - $(RM) *.log *.aux *.toc - -veryclean : clean - $(RM) *.dvi *.ps *.pdf - - -.SECONDARY : $(patsubst %.pdf,%.tex,$(ALL:.ps=.tex)) $(PACKAGE).sty -# Aus der dtx-Datei erzeugte Dateien am Ende nicht wieder löschen. - - - - - diff --git a/Master/texmf-dist/source/latex/eso-pic/eso-pic.dtx b/Master/texmf-dist/source/latex/eso-pic/eso-pic.dtx index f551b28c65f..443258ae40f 100644 --- a/Master/texmf-dist/source/latex/eso-pic/eso-pic.dtx +++ b/Master/texmf-dist/source/latex/eso-pic/eso-pic.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 1998-2005 by Rolf Niepraschk +% Copyright (C) 1998-2009 by Rolf Niepraschk % ------------------------------------------------------------------- % % This file may be distributed and/or modified under the @@ -18,14 +18,14 @@ % This work has the LPPL maintenance status "author-maintained". % % Please send error reports and suggestions for improvements to -% Rolf Niepraschk . +% Rolf Niepraschk . % % \fi % % \iffalse %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesPackage{eso-pic} -% [2006/07/14 v1.1d eso-pic (RN)] +% [2009/10/07 v2.0a eso-pic (RN)] % %<*driver> \documentclass[a4paper]{ltxdoc} @@ -37,7 +37,7 @@ % % \fi % -% \CheckSum{619} +% \CheckSum{681} % % \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 @@ -59,15 +59,15 @@ % =================================================================== % @LaTeX-package-file{ % author = {Rolf Niepraschk}, -% version = "v1.1d", -% date = "14 July 2006", +% version = "v2.0a", +% date = "07 Oct 2009", % filename = "eso-pic.sty", % address = "", % telephone = "", -% email = "Rolf.Niepraschk@ptb.de", +% email = "Rolf.Niepraschk@gmx.de", % codetable = "ISO/ASCII", % keywords = "LaTeX2e, \shipout, picture", -% dependences = "everyshi", +% dependences = "atbegshi", % supported = "yes", % docstring = "LaTeX package which makes it easy to add some % picture commands to every page." @@ -104,25 +104,18 @@ % % \title{The \pkgname{eso-pic} package\thanks{This document % corresponds to \pkgname{eso-pic}~\fileversion, dated \filedate.}} -% \author{Rolf Niepraschk \\ \texttt{Rolf.Niepraschk@ptb.de}} +% \author{Rolf Niepraschk \\ \texttt{Rolf.Niepraschk@gmx.de}} % % \date{} % % \maketitle % -% \begin{abstract} -% This package makes it easy to add some picture commands to every page. -% \end{abstract} -% % \section{Introduction} % -% This package is an extension to Martin Schr\"oder's \pkgname{everyshi} -% package. Using \pkgname{every\-shi}'s \cs{EveryShipout} command -% \pkgname{eso-pic} adds one or more userdefined \texttt{picture} commands to -% \LaTeX's shipout routine. -% +% This package makes it easy to add some picture commands to every page +% at absolute positions. % \section{Usage} -% See also the example \LaTeX\ documents |eso-ex?.tex|. +% See also the example \LaTeX\ documents (|eso-*.tex|). % % \subsection{Basic commands for adding \LaTeX{} stuff to the page background} % \DescribeMacro{\AddToShipoutPicture} All the picture commands which are @@ -152,7 +145,10 @@ % \DescribeMacro{\AtPageCenter} % \DescribeMacro{\AtTextUpperLeft} % \DescribeMacro{\AtTextLowerLeft} -% \DescribeMacro{\AtTextCenter} +% \DescribeMacro{\AtTextCenter} +% \DescribeMacro{\AtStockUpperLeft} +% \DescribeMacro{\AtStockLowerLeft} +% \DescribeMacro{\AtStockCenter} % Helper macros for easier positioning on the page. \vfill\mbox{} % % \subsection{Package options} @@ -192,7 +188,7 @@ % \subsection{The main functionality} % % \begin{macrocode} -\RequirePackage{everyshi} +\RequirePackage{atbegshi} % \end{macrocode} % \begin{macro}{\LenToUnit} % \changes{v1.0d}{2006/07/14}{Using \cmd{\providecommand} instead of @@ -201,10 +197,17 @@ \providecommand*\LenToUnit[1]{#1\@gobble} % \end{macrocode} % \end{macro} +% \begin{macro}{\ESO@isMEMOIR} +% Support for the \clsname{memoir} class. +% \begin{macrocode} +\newcommand\ESO@isMEMOIR[2]{#2} +\@ifclassloaded{memoir}{\renewcommand\ESO@isMEMOIR[2]{#1}}{} +% \end{macrocode} +% \end{macro} % \begin{macro}{\AtPageUpperLeft} % \begin{macrocode} \newcommand\AtPageUpperLeft[1]{% - \put(0,\LenToUnit{\ESO@yoffsetI}){#1}% + \put(0,\LenToUnit{-\ESO@yoffsetI}){#1}% } % \end{macrocode} % \end{macro} @@ -221,21 +224,99 @@ } % \end{macrocode} % \end{macro} +% \begin{macro}{\AtStockLowerLeft} +% \changes{v2.0a}{2009/10/07}{New} +% \begin{macrocode} +\newcommand\AtStockLowerLeft{} +\ESO@isMEMOIR{% + \renewcommand\AtStockLowerLeft[1]{% + \begingroup + \@tempdima=-\stockwidth + \advance\@tempdima\trimedge + \advance\@tempdima\paperwidth + \if@twoside\ifodd\c@page\else + \@tempdima=-\trimedge + \fi\fi + \@tempdimb=-\stockheight + \advance\@tempdimb\paperheight + \advance\@tempdimb\trimtop + \AtPageLowerLeft{% + \put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdimb}){#1}% + }% + \endgroup + } +}{% + \let\AtStockLowerLeft=\AtPageLowerLeft +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\AtStockUpperLeft} +% \changes{v2.0a}{2009/10/07}{New} +% \begin{macrocode} +\newcommand\AtStockUpperLeft{} +\ESO@isMEMOIR{% + \renewcommand\AtStockUpperLeft[1]{% + \AtStockLowerLeft{% + \put(0,\LenToUnit{\stockheight}){#1}% + }% + }% +}{% + \let\AtStockUpperLeft=\AtPageUpperLeft +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\AtStockCenter} +% \changes{v2.0a}{2009/10/07}{New} +% \begin{macrocode} +\newcommand\AtStockCenter{} +\ESO@isMEMOIR{% + \renewcommand\AtStockCenter[1]{% + \AtStockLowerLeft{% + \put(\LenToUnit{.5\stockwidth},\LenToUnit{.5\stockheight}){#1}% + }% + }% +}{% + \let\AtStockCenter=\AtPageCenter +} +% \end{macrocode} +% \end{macro} % \begin{macro}{\AtTextUpperLeft} +% \changes{v2.0a}{2009/10/07}{Works now for class \clsname{memoir}} % \begin{macrocode} -\newcommand\AtTextUpperLeft[1]{% - \begingroup - \setlength\@tempdima{1in}% - \ifodd\c@page% - \advance\@tempdima\oddsidemargin% - \else% - \advance\@tempdima\evensidemargin% - \fi% - \@tempdimb=\ESO@yoffsetI\relax\advance\@tempdimb-1in\relax% - \advance\@tempdimb-\topmargin% - \advance\@tempdimb-\headheight\advance\@tempdimb-\headsep% - \put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdimb}){#1}% - \endgroup +\ESO@isMEMOIR{% + \newcommand\AtTextUpperLeft[1]{% + \begingroup + \ifodd\c@page + \@tempdima=\spinemargin + \else + \@tempdima=\paperwidth + \advance\@tempdima-\textwidth + \advance\@tempdima-\spinemargin + \fi + \@tempdimb=-\uppermargin + \AtPageUpperLeft{% + \put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdimb}){#1}% + }% + \endgroup + } +}{% + \newcommand\AtTextUpperLeft[1]{% + \begingroup + \@tempdima=1in\relax + \ifodd\c@page + \advance\@tempdima\oddsidemargin + \else + \advance\@tempdima\evensidemargin + \fi + \@tempdimb=-1in\relax + \advance\@tempdimb-\topmargin + \advance\@tempdimb-\headheight + \advance\@tempdimb-\headsep + \AtPageUpperLeft{% + \put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdimb}){#1}% + }% + \endgroup + } } % \end{macrocode} % \end{macro} @@ -254,7 +335,8 @@ % \DescribeMacro{\ESO@HookI}\DescribeMacro{\ESO@HookII} % \DescribeMacro{\ESO@HookIII} % \begin{macrocode} -\newcommand{\ESO@HookI}{} \newcommand{\ESO@HookII}{} +\newcommand{\ESO@HookI}{} +\newcommand{\ESO@HookII}{} \newcommand{\ESO@HookIII}{} % \end{macrocode} % \begin{macro}{\AddToShipoutPicture} @@ -270,59 +352,44 @@ \newcommand{\ClearShipoutPicture}{\global\let\ESO@HookI\@empty} % \end{macrocode} % \end{macro} -% \begin{macro}{\ESO@isMEMOIR} -% Support for the \clsname{memoir} class. -% \begin{macrocode} -\newcommand\ESO@isMEMOIR[1]{} -\@ifclassloaded{memoir}{\renewcommand\ESO@isMEMOIR[1]{#1}}{} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\@ShipoutPicture} -% \changes{v0.8}{2002/01/21}{Compatibility with the \clsname{memoir} class -% (suggested by Andreas Matthias).} -% \changes{v0.9}{2002/07/27}{Compatibility with the \pkgname{crop} package -% (better test of \clsname{memoir}).} -% \changes{v0.9}{2002/07/27}{\cmd{\nointerlineskip} prevents a small vertical -% misplacement (suggested by Stephan Lehmke)} -% \changes{v1.0b}{2002/10/23}{A new hook \cmd\ESO@HookIII for special -% purpose (suggested by D. P. Story).} +% \begin{macro}{\AtBeginShipout} +% \begin{macro}{\AtBeginShipoutUpperLeft} +% (see package \pkgname{atbegshi}) % \begin{macrocode} -\newcommand{\@ShipoutPicture}{% - \bgroup - \@tempswafalse% - \ifx\ESO@HookI\@empty\else\@tempswatrue\fi% - \ifx\ESO@HookII\@empty\else\@tempswatrue\fi% - \ifx\ESO@HookIII\@empty\else\@tempswatrue\fi% - \if@tempswa% - \@tempdima=1in\@tempdimb=-\@tempdima% - \advance\@tempdimb\ESO@yoffsetI% - \ESO@isMEMOIR{% - \advance\@tempdima\trimedge% - \advance\@tempdima\paperwidth% - \advance\@tempdima-\stockwidth% - \if@twoside\ifodd\c@page\else% - \advance\@tempdima-2\trimedge% - \advance\@tempdima-\paperwidth% - \advance\@tempdima\stockwidth% - \fi\fi% - \advance\@tempdimb\trimtop}% - \unitlength=\p@% - \global\setbox\@cclv\vbox{% - \vbox{\let\protect\relax - \pictur@(0,0)(\strip@pt\@tempdima,\strip@pt\@tempdimb)% - \ESO@HookIII\ESO@HookI\ESO@HookII% - \global\let\ESO@HookII\@empty% - \endpicture}% - \nointerlineskip% - \box\@cclv}% - \fi - \egroup +\ESO@isMEMOIR{% + \AtBeginShipout{% + \@tempdima=-\trimedge + \advance\@tempdima-\paperwidth + \advance\@tempdima\stockwidth + \if@twoside\ifodd\c@page\else + \advance\@tempdima2\trimedge + \advance\@tempdima\paperwidth + \advance\@tempdima-\stockwidth + \fi\fi + \@tempdimb=\ESO@yoffsetI + \advance\@tempdimb-\trimtop + \nointerlineskip + \AtBeginShipoutUpperLeft{% + \put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdimb}){% + \ESO@HookIII\ESO@HookI\ESO@HookII + \global\let\ESO@HookII\@empty + }% + }% + } +}{% + \AtBeginShipout{% + \nointerlineskip + \AtBeginShipoutUpperLeft{% + \put(0,\LenToUnit{\ESO@yoffsetI}){% + \ESO@HookIII\ESO@HookI\ESO@HookII + \global\let\ESO@HookII\@empty + }% + }% + } } -% \end{macrocode} +% \end{macrocode} +% \end{macro} % \end{macro} -% \begin{macrocode} -\EveryShipout{\@ShipoutPicture} -% \end{macrocode} % \subsection{The background grid} % \begin{macrocode} \RequirePackage{keyval} @@ -420,26 +487,28 @@ % \begin{macrocode} \newcommand\ESO@div[2]{% \@tempdima=#1\relax\@tempdimb=\ESO@gridunit\relax - \@tempdimb=#2\@tempdimb\divide\@tempdima by \@tempdimb% + \@tempdimb=#2\@tempdimb\divide\@tempdima by \@tempdimb \@tempcnta\@tempdima\advance\@tempcnta\@ne} % \end{macrocode} % \end{macro} % \changes{v1.1c}{2005/12/24}{Remove the disadvantageous check of % `pdfTeX'. Now using with Xe\LaTeX\ should be possible.} +% \changes{v2.0a}{2009/10/07}{Better test of color/xcolor} % \begin{macrocode} +\@ifundefined{colorbox}{% + \IfFileExists{xcolor.sty}{\RequirePackage{xcolor}}% + {\RequirePackage{color}}% +}{}% +\let\ESO@color=\color +\let\ESO@colorbox=\colorbox +\let\ESO@fcolorbox=\fcolorbox \AtBeginDocument{% - \IfFileExists{color.sty} - {% - \RequirePackage{color} - \let\ESO@color=\color\let\ESO@colorbox=\colorbox - \let\ESO@fcolorbox=\fcolorbox - }{} \ESO@dvipsfalse \@ifundefined{Gin@driver}{}% {% \ifx\Gin@driver\@empty\else% \filename@parse{\Gin@driver}\def\reserved@a{dvips}% - \ifx\filename@base\reserved@a\ESO@dvipstrue\fi% + \ifx\filename@base\reserved@a\ESO@dvipstrue\fi \fi }% \ifESO@dvips\def\@tempb{eepic}\else\def\@tempb{epic}\fi @@ -454,18 +523,18 @@ (0,0)(0,##1)} }{} \else - \ifx\ESO@gridcolor\ESO@subgridcolor% + \ifx\ESO@gridcolor\ESO@subgridcolor \renewcommand*\ESO@gridlines{\thicklines} \fi \fi } \ifESO@texcoord \def\ESO@yoffsetI{\z@}\def\ESO@yoffsetII{-\paperheight} - \edef\ESO@griddeltaY{-\ESO@griddelta}\edef\ESO@gridDeltaY{-\ESO@gridDelta} -\else - \def\ESO@yoffsetI{\paperheight}\def\ESO@yoffsetII{\z@} + \edef\ESO@griddeltaY{-\ESO@griddelta}\edef\ESO@gridDeltaY{-\ESO@gridDelta} +\else + \def\ESO@yoffsetI{-\paperheight}\def\ESO@yoffsetII{\z@} \edef\ESO@griddeltaY{\ESO@griddelta}\edef\ESO@gridDeltaY{\ESO@gridDelta} -\fi +\fi % \end{macrocode} % \begin{macro}{\ESO@gridpicture} % \begin{macrocode} @@ -505,32 +574,32 @@ \fontsize{10}{12}\normalfont% \ESO@div{\paperwidth}{\ESO@gridDelta}% \multiput(0,\ESO@gridDeltaY)(\ESO@gridDelta,0){\@tempcnta}{% - \@tempcntb=\@tempcnta\advance\@tempcntb-\@multicnt% + \@tempcntb=\@tempcnta\advance\@tempcntb-\@multicnt \ifnum\@tempcntb>1\relax - \multiply\@tempcntb by \ESO@gridDelta\relax% - \@tempdima=\@tempcntb sp\@tempdima=\ESO@labelfactor\@tempdima% + \multiply\@tempcntb by \ESO@gridDelta\relax + \@tempdima=\@tempcntb sp\@tempdima=\ESO@labelfactor\@tempdima \@tempcntb=\@tempdima% \makebox(0,0)[c]{\ESO@colorbox{white}{\the\@tempcntb}}% \fi}% % \end{macrocode} % --- vertical numbers --- % \begin{macrocode} - \ifx\ESO@gridunitname\@empty\def\@tempa{0}\else\def\@tempa{1}\fi% + \ifx\ESO@gridunitname\@empty\def\@tempa{0}\else\def\@tempa{1}\fi \ESO@div{\paperheight}{\ESO@gridDelta}% \multiput(\ESO@gridDelta,0)(0,\ESO@gridDeltaY){\@tempcnta}{% \@tempcntb=\@tempcnta\advance\@tempcntb-\@multicnt% \ifnum\@tempcntb>\@tempa\relax \multiply\@tempcntb by \ESO@gridDelta\relax% - \@tempdima=\@tempcntb sp\@tempdima=\ESO@labelfactor\@tempdima% - \@tempcntb=\@tempdima% - \makebox(0,0)[c]{\ESO@colorbox{white}{\the\@tempcntb}}% + \@tempdima=\@tempcntb sp\@tempdima=\ESO@labelfactor\@tempdima + \@tempcntb=\@tempdima + \makebox(0,0)[c]{\ESO@colorbox{white}{\the\@tempcntb}}% \fi }% % \end{macrocode} % --- the unit label --- % \begin{macrocode} - \ifx\ESO@gridunitname\@empty\else% - \thicklines\fboxrule=\@wholewidth% + \ifx\ESO@gridunitname\@empty\else + \thicklines\fboxrule=\@wholewidth \put(\ESO@gridDelta,\ESO@gridDeltaY){\makebox(0,0)[c]{% \ESO@fcolorbox{\ESO@gridcolor}{white}{% \textbf{\ESO@gridunitname}}}}% diff --git a/Master/texmf-dist/source/latex/eso-pic/eso-pic.ins b/Master/texmf-dist/source/latex/eso-pic/eso-pic.ins index 4c4904d3602..8becc8776e9 100644 --- a/Master/texmf-dist/source/latex/eso-pic/eso-pic.ins +++ b/Master/texmf-dist/source/latex/eso-pic/eso-pic.ins @@ -1,5 +1,5 @@ %% -%% Copyright (C) 2002 by Rolf Niepraschk +%% Copyright (C) 2009 by Rolf Niepraschk %% %% This file may be distributed and/or modified under the conditions of %% the LaTeX Project Public License, either version 1.2 of this license @@ -14,12 +14,12 @@ \input docstrip.tex \keepsilent - +\askforoverwritefalse \preamble This is a generated file. -Copyright (C) 1998-2002 by Rolf Niepraschk +Copyright (C) 1998-2009 by Rolf Niepraschk This file may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.2 of this license diff --git a/Master/texmf-dist/tex/latex/eso-pic/eso-pic.sty b/Master/texmf-dist/tex/latex/eso-pic/eso-pic.sty index 9d294621022..4fb6031ce1e 100644 --- a/Master/texmf-dist/tex/latex/eso-pic/eso-pic.sty +++ b/Master/texmf-dist/tex/latex/eso-pic/eso-pic.sty @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (C) 1998-2002 by Rolf Niepraschk +%% Copyright (C) 1998-2009 by Rolf Niepraschk %% %% This file may be distributed and/or modified under the conditions of %% the LaTeX Project Public License, either version 1.2 of this license @@ -22,74 +22,136 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{eso-pic} - [2006/07/14 v1.1d eso-pic (RN)] -\RequirePackage{everyshi} + [2009/10/07 v2.0a eso-pic (RN)] +\RequirePackage{atbegshi} \providecommand*\LenToUnit[1]{#1\@gobble} +\newcommand\ESO@isMEMOIR[2]{#2} +\@ifclassloaded{memoir}{\renewcommand\ESO@isMEMOIR[2]{#1}}{} \newcommand\AtPageUpperLeft[1]{% - \put(0,\LenToUnit{\ESO@yoffsetI}){#1}% + \put(0,\LenToUnit{-\ESO@yoffsetI}){#1}% } \newcommand\AtPageLowerLeft[1]{\AtPageUpperLeft{% \put(0,\LenToUnit{-\paperheight}){#1}}} \newcommand\AtPageCenter[1]{\AtPageUpperLeft{% \put(\LenToUnit{.5\paperwidth},\LenToUnit{-.5\paperheight}){#1}}% } -\newcommand\AtTextUpperLeft[1]{% - \begingroup - \setlength\@tempdima{1in}% - \ifodd\c@page% - \advance\@tempdima\oddsidemargin% - \else% - \advance\@tempdima\evensidemargin% - \fi% - \@tempdimb=\ESO@yoffsetI\relax\advance\@tempdimb-1in\relax% - \advance\@tempdimb-\topmargin% - \advance\@tempdimb-\headheight\advance\@tempdimb-\headsep% - \put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdimb}){#1}% - \endgroup +\newcommand\AtStockLowerLeft{} +\ESO@isMEMOIR{% + \renewcommand\AtStockLowerLeft[1]{% + \begingroup + \@tempdima=-\stockwidth + \advance\@tempdima\trimedge + \advance\@tempdima\paperwidth + \if@twoside\ifodd\c@page\else + \@tempdima=-\trimedge + \fi\fi + \@tempdimb=-\stockheight + \advance\@tempdimb\paperheight + \advance\@tempdimb\trimtop + \AtPageLowerLeft{% + \put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdimb}){#1}% + }% + \endgroup + } +}{% + \let\AtStockLowerLeft=\AtPageLowerLeft +} +\newcommand\AtStockUpperLeft{} +\ESO@isMEMOIR{% + \renewcommand\AtStockUpperLeft[1]{% + \AtStockLowerLeft{% + \put(0,\LenToUnit{\stockheight}){#1}% + }% + }% +}{% + \let\AtStockUpperLeft=\AtPageUpperLeft +} +\newcommand\AtStockCenter{} +\ESO@isMEMOIR{% + \renewcommand\AtStockCenter[1]{% + \AtStockLowerLeft{% + \put(\LenToUnit{.5\stockwidth},\LenToUnit{.5\stockheight}){#1}% + }% + }% +}{% + \let\AtStockCenter=\AtPageCenter +} +\ESO@isMEMOIR{% + \newcommand\AtTextUpperLeft[1]{% + \begingroup + \ifodd\c@page + \@tempdima=\spinemargin + \else + \@tempdima=\paperwidth + \advance\@tempdima-\textwidth + \advance\@tempdima-\spinemargin + \fi + \@tempdimb=-\uppermargin + \AtPageUpperLeft{% + \put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdimb}){#1}% + }% + \endgroup + } +}{% + \newcommand\AtTextUpperLeft[1]{% + \begingroup + \@tempdima=1in\relax + \ifodd\c@page + \advance\@tempdima\oddsidemargin + \else + \advance\@tempdima\evensidemargin + \fi + \@tempdimb=-1in\relax + \advance\@tempdimb-\topmargin + \advance\@tempdimb-\headheight + \advance\@tempdimb-\headsep + \AtPageUpperLeft{% + \put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdimb}){#1}% + }% + \endgroup + } } \newcommand\AtTextLowerLeft[1]{\AtTextUpperLeft{% \put(0,\LenToUnit{-\textheight}){#1}}} \newcommand\AtTextCenter[1]{\AtTextUpperLeft{% \put(\LenToUnit{.5\textwidth},\LenToUnit{-.5\textheight}){#1}}} -\newcommand{\ESO@HookI}{} \newcommand{\ESO@HookII}{} +\newcommand{\ESO@HookI}{} +\newcommand{\ESO@HookII}{} \newcommand{\ESO@HookIII}{} \newcommand{\AddToShipoutPicture}{% \@ifstar{\g@addto@macro\ESO@HookII}{\g@addto@macro\ESO@HookI}} \newcommand{\ClearShipoutPicture}{\global\let\ESO@HookI\@empty} -\newcommand\ESO@isMEMOIR[1]{} -\@ifclassloaded{memoir}{\renewcommand\ESO@isMEMOIR[1]{#1}}{} -\newcommand{\@ShipoutPicture}{% - \bgroup - \@tempswafalse% - \ifx\ESO@HookI\@empty\else\@tempswatrue\fi% - \ifx\ESO@HookII\@empty\else\@tempswatrue\fi% - \ifx\ESO@HookIII\@empty\else\@tempswatrue\fi% - \if@tempswa% - \@tempdima=1in\@tempdimb=-\@tempdima% - \advance\@tempdimb\ESO@yoffsetI% - \ESO@isMEMOIR{% - \advance\@tempdima\trimedge% - \advance\@tempdima\paperwidth% - \advance\@tempdima-\stockwidth% - \if@twoside\ifodd\c@page\else% - \advance\@tempdima-2\trimedge% - \advance\@tempdima-\paperwidth% - \advance\@tempdima\stockwidth% - \fi\fi% - \advance\@tempdimb\trimtop}% - \unitlength=\p@% - \global\setbox\@cclv\vbox{% - \vbox{\let\protect\relax - \pictur@(0,0)(\strip@pt\@tempdima,\strip@pt\@tempdimb)% - \ESO@HookIII\ESO@HookI\ESO@HookII% - \global\let\ESO@HookII\@empty% - \endpicture}% - \nointerlineskip% - \box\@cclv}% - \fi - \egroup +\ESO@isMEMOIR{% + \AtBeginShipout{% + \@tempdima=-\trimedge + \advance\@tempdima-\paperwidth + \advance\@tempdima\stockwidth + \if@twoside\ifodd\c@page\else + \advance\@tempdima2\trimedge + \advance\@tempdima\paperwidth + \advance\@tempdima-\stockwidth + \fi\fi + \@tempdimb=\ESO@yoffsetI + \advance\@tempdimb-\trimtop + \nointerlineskip + \AtBeginShipoutUpperLeft{% + \put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdimb}){% + \ESO@HookIII\ESO@HookI\ESO@HookII + \global\let\ESO@HookII\@empty + }% + }% + } +}{% + \AtBeginShipout{% + \nointerlineskip + \AtBeginShipoutUpperLeft{% + \put(0,\LenToUnit{\ESO@yoffsetI}){% + \ESO@HookIII\ESO@HookI\ESO@HookII + \global\let\ESO@HookII\@empty + }% + }% + } } -\EveryShipout{\@ShipoutPicture} \RequirePackage{keyval} \newif\ifESO@dvips\ESO@dvipsfalse \newif\ifESO@grid\ESO@gridfalse \newif\ifESO@texcoord\ESO@texcoordfalse @@ -163,21 +225,22 @@ \ProcessOptionsWithKV{ESO}% \newcommand\ESO@div[2]{% \@tempdima=#1\relax\@tempdimb=\ESO@gridunit\relax - \@tempdimb=#2\@tempdimb\divide\@tempdima by \@tempdimb% + \@tempdimb=#2\@tempdimb\divide\@tempdima by \@tempdimb \@tempcnta\@tempdima\advance\@tempcnta\@ne} +\@ifundefined{colorbox}{% + \IfFileExists{xcolor.sty}{\RequirePackage{xcolor}}% + {\RequirePackage{color}}% +}{}% +\let\ESO@color=\color +\let\ESO@colorbox=\colorbox +\let\ESO@fcolorbox=\fcolorbox \AtBeginDocument{% - \IfFileExists{color.sty} - {% - \RequirePackage{color} - \let\ESO@color=\color\let\ESO@colorbox=\colorbox - \let\ESO@fcolorbox=\fcolorbox - }{} \ESO@dvipsfalse \@ifundefined{Gin@driver}{}% {% \ifx\Gin@driver\@empty\else% \filename@parse{\Gin@driver}\def\reserved@a{dvips}% - \ifx\filename@base\reserved@a\ESO@dvipstrue\fi% + \ifx\filename@base\reserved@a\ESO@dvipstrue\fi \fi }% \ifESO@dvips\def\@tempb{eepic}\else\def\@tempb{epic}\fi @@ -201,7 +264,7 @@ \def\ESO@yoffsetI{\z@}\def\ESO@yoffsetII{-\paperheight} \edef\ESO@griddeltaY{-\ESO@griddelta}\edef\ESO@gridDeltaY{-\ESO@gridDelta} \else - \def\ESO@yoffsetI{\paperheight}\def\ESO@yoffsetII{\z@} + \def\ESO@yoffsetI{-\paperheight}\def\ESO@yoffsetII{\z@} \edef\ESO@griddeltaY{\ESO@griddelta}\edef\ESO@gridDeltaY{\ESO@gridDelta} \fi \newcommand\ESO@gridpicture{% @@ -224,26 +287,26 @@ \fontsize{10}{12}\normalfont% \ESO@div{\paperwidth}{\ESO@gridDelta}% \multiput(0,\ESO@gridDeltaY)(\ESO@gridDelta,0){\@tempcnta}{% - \@tempcntb=\@tempcnta\advance\@tempcntb-\@multicnt% + \@tempcntb=\@tempcnta\advance\@tempcntb-\@multicnt \ifnum\@tempcntb>1\relax - \multiply\@tempcntb by \ESO@gridDelta\relax% - \@tempdima=\@tempcntb sp\@tempdima=\ESO@labelfactor\@tempdima% + \multiply\@tempcntb by \ESO@gridDelta\relax + \@tempdima=\@tempcntb sp\@tempdima=\ESO@labelfactor\@tempdima \@tempcntb=\@tempdima% \makebox(0,0)[c]{\ESO@colorbox{white}{\the\@tempcntb}}% \fi}% - \ifx\ESO@gridunitname\@empty\def\@tempa{0}\else\def\@tempa{1}\fi% + \ifx\ESO@gridunitname\@empty\def\@tempa{0}\else\def\@tempa{1}\fi \ESO@div{\paperheight}{\ESO@gridDelta}% \multiput(\ESO@gridDelta,0)(0,\ESO@gridDeltaY){\@tempcnta}{% \@tempcntb=\@tempcnta\advance\@tempcntb-\@multicnt% \ifnum\@tempcntb>\@tempa\relax \multiply\@tempcntb by \ESO@gridDelta\relax% - \@tempdima=\@tempcntb sp\@tempdima=\ESO@labelfactor\@tempdima% - \@tempcntb=\@tempdima% + \@tempdima=\@tempcntb sp\@tempdima=\ESO@labelfactor\@tempdima + \@tempcntb=\@tempdima \makebox(0,0)[c]{\ESO@colorbox{white}{\the\@tempcntb}}% \fi }% - \ifx\ESO@gridunitname\@empty\else% - \thicklines\fboxrule=\@wholewidth% + \ifx\ESO@gridunitname\@empty\else + \thicklines\fboxrule=\@wholewidth \put(\ESO@gridDelta,\ESO@gridDeltaY){\makebox(0,0)[c]{% \ESO@fcolorbox{\ESO@gridcolor}{white}{% \textbf{\ESO@gridunitname}}}}% diff --git a/Master/texmf-dist/tex/latex/eso-pic/showframe.sty b/Master/texmf-dist/tex/latex/eso-pic/showframe.sty deleted file mode 100644 index 04b11d60ce4..00000000000 --- a/Master/texmf-dist/tex/latex/eso-pic/showframe.sty +++ /dev/null @@ -1,50 +0,0 @@ - -% Rolf Niepraschk -- Rolf.Niepraschk@ptb.de - -% Draws visible frames for the text and margin area, and lines -% for the head and foot to check layout in detail. Using the package -% option "noframe" you can draw the frames later only for a single -% page with \AddToShipoutPicture*{\ShowFramePicture}. Another useful -% options maybe eso-pic's "colorgrid", "grid" and "texcoord". - -\ProvidesPackage{showframe}[2008/12/09 v0.1h showframe (new impl., RN)] - -\newif\ifSF@frame\SF@frametrue - -\DeclareOption{noframe}{\SF@framefalse} -\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{eso-pic}} -\ProcessOptions\relax - -\RequirePackage{eso-pic}[2002/10/30] - -\newcommand\ShowFramePicture{% - \begingroup - \normalcolor\thicklines - \AtPageLowerLeft{% - \framebox(\LenToUnit{\paperwidth},\LenToUnit{\paperheight}){}}% - \AtTextLowerLeft{% - \framebox(\LenToUnit{\textwidth},\LenToUnit{\textheight}){}}% - \AtTextUpperLeft{% - \put(0,\LenToUnit{\headsep}){% - \framebox(\LenToUnit{\textwidth},\LenToUnit{\headheight}){}}}% - \AtTextLowerLeft{% - \put(0,\LenToUnit{-\footskip}){% - \line(1,0){\LenToUnit{\textwidth}}}}% - \AtTextLowerLeft{% - \@tempdima=\textwidth\advance\@tempdima\marginparsep% - \if@twoside - \ifodd\c@page\else - \if@mparswitch - \@tempdima=-\marginparsep\advance\@tempdima-\marginparwidth - \fi - \fi - \fi - \put(\LenToUnit{\@tempdima},0)% - {\framebox(\LenToUnit{\marginparwidth},\LenToUnit{\textheight}){}}% - }% - \endgroup -} - -\ifSF@frame\AddToShipoutPicture{\ShowFramePicture}\fi - -\endinput -- cgit v1.2.3