diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/oberdiek/zref-abspos.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/oberdiek/zref-abspos.sty | 310 |
1 files changed, 304 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/oberdiek/zref-abspos.sty b/Master/texmf-dist/tex/latex/oberdiek/zref-abspos.sty index 44d9b048a0c..1df212b6a91 100644 --- a/Master/texmf-dist/tex/latex/oberdiek/zref-abspos.sty +++ b/Master/texmf-dist/tex/latex/oberdiek/zref-abspos.sty @@ -9,9 +9,9 @@ %% This is a generated file. %% %% Project: zref -%% Version: 2011/03/18 v2.21 +%% Version: 2012/04/04 v2.24 %% -%% Copyright (C) 2006-2011 by +%% Copyright (C) 2006-2012 by %% Heiko Oberdiek <heiko.oberdiek at googlemail.com> %% %% This work may be distributed and/or modified under the @@ -44,19 +44,317 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{zref-abspos}% - [2011/03/18 v2.21 Module abspos for zref (HO)]% -\RequirePackage{zref-base}[2011/03/18] + [2012/04/04 v2.24 Module abspos for zref (HO)]% +\RequirePackage{zref-base}[2012/04/04] \ifx\ZREF@base@ok Y% \else \expandafter\endinput \fi -\RequirePackage{zref-savepos}[2011/03/18] +\RequirePackage{zref-savepos}[2012/04/04] \ifx\ZREF@savepos@ok Y% \else \expandafter\endinput \fi -\RequirePackage{zref-pagelayout}[2011/03/18] +\RequirePackage{zref-pagelayout}[2012/04/04] \zref@addprop{savepos}{abspage} +\RequirePackage{ifpdf}[2010/09/13] +\newcommand*{\zref@absposx}[3]{% + \number + \expandafter\zref@absposnumx\expandafter{% + \number\zref@extractdefault{#1}{abspage}{0}% + }{#2}{#3}% + \ltx@space +} +\newcommand*{\zref@absposy}[3]{% + \number + \expandafter\zref@absposnumy\expandafter{% + \number\zref@extractdefault{#1}{abspage}{0}% + }{#2}{#3}% + \ltx@space +} +\newcommand*{\zref@absposnumx}[3]{% + \number + \numexpr\ZREF@absposnum{thepage#1}{#2}{x}{#3}\relax +} +\newcommand*{\zref@absposnumy}[3]{% + \number + \numexpr\ZREF@absposnum{thepage#1}{#2}{y}{#3}\relax +} +\def\ZREF@absposnum#1#2#3#4{% + \ltx@ifundefined{ZREF@abspos@#2@#3@#4}{% + 0% + }{% + \csname ZREF@abspos@#2@#3@#4\endcsname{#1}% + }% +} +\ZREF@Robust\def\zref@def@absposx#1{% + \zref@wrapper@babel{\ZREF@def@abspos{#1}\zref@absposx}% +} +\ZREF@Robust\def\zref@def@absposy#1{% + \zref@wrapper@babel{\ZREF@def@abspos{#1}\zref@absposy}% +} +\ZREF@Robust\def\zref@def@absposnumx#1{% + \zref@wrapper@babel{\ZREF@def@abspos{#1}\zref@absposnumx}% +} +\ZREF@Robust\def\zref@def@absposnumy#1{% + \zref@wrapper@babel{\ZREF@def@abspos{#1}\zref@absposnumy}% +} +\def\ZREF@def@absposnumy#1#2#3#4#5{% + \edef#1{#2{#3}{#4}{#5}}% +} +\ZREF@Robust\def\zref@absposused{% + \zref@wrapper@babel\ZREF@abspos@used +} +\def\ZREF@abspos@used#1{% + \zref@refused{#1}% + \zref@ifrefundefined{#1}{% + }{% + \begingroup + \edef\ZREF@temp{% + \zref@extractdefault{#1}{abspage}{0}% + }% + \ifnum\ZREF@temp>\ltx@zero + \zref@refused{thepage\ZREF@temp}% + \else + \@PackageError{zref-abspos}{% + \string\zref@pos@label@used\ltx@space + needs property `abspage'\MessageBreak + in label `#1'% + }\@ehc + \fi + \endgroup + }% +} +\newcommand*{\zref@absposnumused}[1]{% + \ifnum#1>\ltx@zero + \zref@refused{thepage\number#1}% + \else + \@PackageError{zref-abspos}{% + Invalid absolute page number (#1)\MessageBreak + for \string\zref@pos@num@used.\MessageBreak + A positive integer is expected% + }\@ehc + \fi +} +\def\zref@ifabsposundefined#1{% + \zref@ifrefundefined{#1}\ltx@firsttwo{% + \expandafter\zref@ifabsposnumundefined\expandafter{% + \number\zref@extractdefault{#1}{abspage}{0}% + }% + }% +} +\def\zref@ifabsposnumundefined#1{% + \ifnum\ZREF@number{#1}>\ltx@zero + \zref@ifrefundefined{thepage#1}% + \ltx@firstoftwo\ltx@secondoftwo + \else + \expandafter\ltx@firstoftwo + \fi +} +\edef\ZREF@abspos@media@width{% + \ltx@ifundefined{pdfpagewidth}{% + \ltx@ifundefined{mediawidth}{% + \ltx@ifundefined{stockwidth}{% + paperwidth% + }{% + stockwidth% + }% + }{% + mediawidth% + }% + }{% + pdfpagewidth% + }% +} +\edef\ZREF@abspos@media@height{% + \ltx@ifundefined{pdfpageheight}{% + \ltx@ifundefined{mediaheight}{% + \ltx@ifundefined{stockheight}{% + paperheight% + }{% + stockheight% + }% + }{% + mediaheight% + }% + }{% + \noexpand\ifcase\pdfpageheight + \ltx@ifundefined{stockheight}{% + paperheight% + }{% + stockheight% + }% + \noexpand\else + pdfpageheight% + \noexpand\fi + }% +} +\def\ZREF@abspos@media@x@left#1{% + 0% +} +\def\ZREF@abspos@media@x@right#1{% + \zref@extract{#1}\ZREF@abspos@media@width +} +\def\ZREF@abspos@media@x@center#1{% + \ZREF@abspos@media@x@left{#1}% + +\zref@extract{#1}\ZREF@abspos@media@width/2% +} +\def\ZREF@abspos@media@y@top#1{% + \zref@extract{#1}\ZREF@abspos@media@height +} +\def\ZREF@abspos@media@y@bottom#1{% + 0% +} +\def\ZREF@abspos@media@y@center#1{% + \zref@extract{#1}\ZREF@abspos@media@height/2% +} +\def\ZREF@abspos@paper@x@left#1{% + 0% +} +\def\ZREF@abspos@paper@x@right#1{% + \zref@extract{#1}{paperwidth}% +} +\def\ZREF@abspos@paper@x@center#1{% + \zref@extract{#1}{paperwidth}/2% +} +\let\ZREF@abspos@paper@y@top\ZREF@abspos@media@y@top +\def\ZREF@abspos@paper@y@bottom#1{% + \ZREF@abspos@paper@y@top{#1}% + -\zref@extract{#1}{paperheight}% +} +\def\ZREF@abspos@paper@y@center#1{% + \ZREF@abspos@paper@y@top{#1}% + -\zref@extract{#1}{paperheight}/2% +} +\let\ZREF@temp\ltx@two +\ltx@IfUndefined{pdfhorigin}{}{% + \ifpdf + \let\ZREF@temp\ltx@zero + \fi +} +\ifx\ZREF@temp\ltx@two + \ifnum\mag=1000 % + \let\ZREF@temp\ltx@one + \fi +\fi +\ifcase\ZREF@temp + \def\ZREF@abspos@origin@x#1{% + \zref@extract{#1}{pdfhorigin}% + }% +\or + \def\ZREF@abspos@origin@x#1{% + 4736286% + }% +\or + \def\ZREF@abspos@origin@x#1{% + \numexpr\mag/1000*\dimexpr 1truein\relax\relax + }% +\fi +\let\ZREF@temp\ltx@two +\ltx@IfUndefined{pdfvorigin}{}{% + \ifpdf + \let\ZREF@temp\ltx@zero + \fi +} +\ifx\ZREF@temp\ltx@two + \ifnum\mag=1000 % + \let\ZREF@temp\ltx@one + \fi +\fi +\ifcase\ZREF@temp + \def\ZREF@abspos@origin@y#1{% + \zref@extract{#1}{pdfvorigin}% + }% +\or + \def\ZREF@abspos@origin@y#1{% + 4736286% + }% +\or + \def\ZREF@abspos@origin@y#1{% + \numexpr\mag/1000*\dimexpr 1truein\relax\relax + }% +\fi +\def\ZREF@abspos@head@x@left#1{% + \ZREF@abspos@paper@x@left{#1}% + +\ZREF@abspos@origin@x{#1}% + +\zref@extract{#1}{hoffset}% + +\ifodd\zref@extractdefault{#1}{pagevalue}{\number\c@page} % + \zref@extract{#1}{oddsidemargin}% + \else + \zref@extract{#1}{evensidemargin}% + \fi +} +\def\ZREF@abspos@head@x@right#1{% + \ZREF@abspos@head@x@left{#1}% + +\zref@extract{#1}{textwidth}% +} +\def\ZREF@abspos@head@x@center#1{% + \ZREF@abspos@head@x@left{#1}% + +\zref@extract{#1}{textwidth}/2% +} +\def\ZREF@abspos@head@y@top#1{% + \ZREF@abspos@paper@y@top{#1}% + -\ZREF@abspos@origin@y{#1}% + -\zref@extract{#1}{voffset}% + -\zref@extract{#1}{topmargin}% +} +\def\ZREF@abspos@head@y@bottom#1{% + \ZREF@abspos@head@y@top{#1}% + -\zref@extract{#1}{headheight}% +} +\def\ZREF@abspos@head@y@center#1{% + \ZREF@abspos@head@y@top{#1}% + -\zref@extract{#1}{headheight}/2% +} +\let\ZREF@abspos@body@x@left\ZREF@abspos@head@x@left +\let\ZREF@abspos@body@x@right\ZREF@abspos@head@x@right +\let\ZREF@abspos@body@x@center\ZREF@abspos@head@x@center +\def\ZREF@abspos@body@y@top#1{% + \ZREF@abspos@head@y@bottom{#1}% + -\zref@extract{#1}{headsep}% +} +\def\ZREF@abspos@body@y@bottom#1{% + \ZREF@abspos@body@y@top{#1}% + -\zref@extract{#1}{textheight}% +} +\def\ZREF@abspos@body@y@center#1{% + \ZREF@abspos@body@y@top{#1}% + -\zref@extract{#1}{textheight}/2% +} +\let\ZREF@abspos@foot@x@left\ZREF@abspos@head@x@left +\let\ZREF@abspos@foot@x@right\ZREF@abspos@head@x@right +\let\ZREF@abspos@foot@x@center\ZREF@abspos@head@x@center +\def\ZREF@abspos@foot@y@bottom#1{% + \ZREF@abspos@body@y@bottom{#1}% + -\zref@extract{#1}{footskip}% +} +\def\ZREF@abspos@marginpar@x@left#1{% + \ifodd\zref@extractdefault{#1}{pagevalue}{\number\c@page} % + \ZREF@abspos@body@x@right{#1}% + +\zref@extract{#1}{marginparsep}% + \else + \ZREF@abspos@body@x@left{#1}% + -\zref@extract{#1}{marginparsep}% + -\zref@extract{#1}{marginparwidth}% + \fi +} +\def\ZREF@abspos@marginpar@x@right#1{% + \ZREF@abspos@marginpar@x@left{#1}% + +\zref@extract{#1}{marginparwidth}% +} +\def\ZREF@abspos@marginpar@x@center#1{% + \ZREF@abspos@marginpar@x@left{#1}% + +\zref@extract{#1}{marginparwidth}/2% +} +\let\ZREF@abspos@marginpar@y@top\ZREF@abspos@body@y@top +\let\ZREF@abspos@marginpar@y@bottom\ZREF@abspos@body@y@bottom +\let\ZREF@abspos@marginpar@y@center\ZREF@abspos@body@y@center +\let\ZREF@abspos@stock@x@left\ZREF@abspos@paper@x@left +\let\ZREF@abspos@stock@x@right\ZREF@abspos@paper@x@right +\let\ZREF@abspos@stock@x@center\ZREF@abspos@paper@x@center +\let\ZREF@abspos@stock@y@top\ZREF@abspos@paper@y@top +\let\ZREF@abspos@stock@y@bottom\ZREF@abspos@paper@y@bottom +\let\ZREF@abspos@stock@y@center\ZREF@abspos@paper@y@center \endinput %% %% End of file `zref-abspos.sty'. |