summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/oberdiek/pdflscape.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/oberdiek/pdflscape.sty')
-rw-r--r--Master/texmf-dist/tex/latex/oberdiek/pdflscape.sty168
1 files changed, 64 insertions, 104 deletions
diff --git a/Master/texmf-dist/tex/latex/oberdiek/pdflscape.sty b/Master/texmf-dist/tex/latex/oberdiek/pdflscape.sty
index 0fc8932e243..bedf1c25ff7 100644
--- a/Master/texmf-dist/tex/latex/oberdiek/pdflscape.sty
+++ b/Master/texmf-dist/tex/latex/oberdiek/pdflscape.sty
@@ -1,47 +1,35 @@
-% File: pdflscape.sty
-% Version: 2004/05/11 v0.3
-% Author: Heiko Oberdiek
-% Email: oberdiek@uni-freiburg.de
-%
-% Copyright: Copyright (C) 2004 Heiko Oberdiek.
-%
-% This program may be distributed and/or modified under
-% the conditions of the LaTeX Project Public License,
-% either version 1.2 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.2 or later is part of all distributions
-% of LaTeX version 1999/12/01 or later.
-%
-% Function: Package `pdflscape' adds PDF support to the
-% environment `landscape' of package `lscape'
-% by setting the PDF page attribute `/Rotate'.
-% Driver options:
-% `pdftex'
-% `dvips', `dvipsone', `pctex32', `pctexps'
-% (and other drivers that provide a
-% non-empty \Gin@PS@raw)
-% `dvipdfm'
-%
-% Required: * The package `lscape'.
-%
-% Use: Load this package instead of package `lscape':
-% \usepackage{pdflscape}
-% \begin{landscape}...\end{landscape}
-%
-% History: 2001/01/15 v0.1:
-% * first public version,
-% published in de.comp.text.tex.
-% 2001/02/04 v0.2:
-% * minor documentation update.
-% * CTAN.
-% 2004/05/11 v0.3:
-% * Support for dvipdfm added.
-%
-\NeedsTeXFormat{LaTeX2e}[1994/06/01]
-\ProvidesPackage{pdflscape}
- [2004/05/11 v0.3 Landscape pages in PDF (HO)]
+%%
+%% This is file `pdflscape.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% pdflscape.dtx (with options: `package')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2001, 2004, 2006 by
+%% Heiko Oberdiek <oberdiek@uni-freiburg.de>
+%%
+%% 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".
+%%
+%% This Current Maintainer of this work is Heiko Oberdiek.
+%%
+%% This work consists of the main source file pdflscape.dtx
+%% and the derived files
+%% pdflscape.sty, pdflscape.pdf, pdflscape.ins, pdflscape.drv.
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{pdflscape}%
+ [2006/04/24 v0.6 Landscape pages in PDF (HO)]
\let\PLS@driver\@empty
\DeclareOption{pdftex}{%
\PassOptionsToPackage\CurrentOption{lscape}%
@@ -66,8 +54,6 @@
\DeclareOption*{\PassOptionsToPackage\CurrentOption{lscape}}
\ProcessOptions
\RequirePackage{lscape}
-
-% Autodetection of driver
\def\PLS@temp{pdftex}
\ifnum 1=0\ifx\pdfoutput\@undefined
\else
@@ -92,7 +78,6 @@
\let\PLS@driver\PLS@temp
\fi
\fi
-
\def\PLS@temp{dvips}
\ifnum 1=0\ifx\Gin@PS@raw\@undefined
\else
@@ -119,8 +104,6 @@
\let\PLS@driver\PLS@temp
\fi
\fi
-
-% dvipdfm
\def\PLS@temp{dvipdfm.def}
\ifx\PLS@temp\Gin@driver
\def\PLS@temp{dvipdfm}%
@@ -144,21 +127,10 @@
Neither pdfTeX, PostScript, nor dvipdfm driver found%
}\@ehc
\fi
-
-% Driver stuff:
-% * \PLS@AddRotate#1
-% it expects the correct rotation number in #1
-% and implements the adding of the /Rotation entry
-% in the /Page object of the current page.
-% * \PLS@RemoveRotate
-% it removes a previous /Rotate entry, if necessary.
-
-% Driver pdfTeX
\def\PLS@temp{pdftex}
\ifx\PLS@temp\PLS@driver
\def\PLS@AddRotate#1{%
\ifnum#1=0
- % already the default
\else
\global\pdfpageattr\expandafter{%
\the\pdfpageattr
@@ -166,91 +138,78 @@
}%
\fi
}
- % Removes a /Rotate entry. It has to be called inside
- % a group.
\def\PLS@RemoveRotate{%
- \global\pdfpageattr\expandafter{\expandafter}%
- \expandafter\PLS@@RemoveRotate
- \the\pdfpageattr /Rotate\@nil
+ \begingroup
+ \global\pdfpageattr\expandafter{\expandafter}%
+ \expandafter\PLS@@RemoveRotate
+ \the\pdfpageattr /Rotate\@nil
+ \endgroup
}
\def\PLS@@RemoveRotate#1/Rotate#2\@nil{%
- % append /Rotate free stuff to \pdfpageattr
\global\pdfpageattr\expandafter{\the\pdfpageattr#1}%
\ifx\\#2\\%
- % ready, because the detected /Rotate is part of
- % the end marker: /Rotate\@nil
\else
- % first read in the argument of /Rotate,
- % then continue parsing.
\afterassignment\PLS@@RemoveRotate
\count0=#2\@nil
\fi
}
\fi
-
-% Driver PostScript
\def\PLS@temp{dvips}
\ifx\PLS@temp\PLS@driver
+ \RequirePackage{everyshi}%
+ \EveryShipout{\PLS@EveryShi}%
+ \let\PLS@EveryShi\@empty
\def\PLS@AddRotate#1{%
\ifnum#1=0
\else
- \Gin@PS@raw{%
- [{ThisPage}\string<\string</Rotate #1\string>\string>%
- /PUT pdfmark%
+ \def\PLS@EveryShi{%
+ \global\setbox\@cclv\vbox{%
+ \Gin@PS@raw{%
+ [{ThisPage}\string<\string</Rotate #1\string>\string>%
+ /PUT pdfmark%
+ }%
+ \box\@cclv
+ }%
}%
\fi
}%
- \let\PLS@RemoveRotate\relax
+ \def\PLS@RemoveRotate{\let\PLS@EveryShi\@empty}%
\fi
-
-% Driver dvipdfm
\def\PLS@temp{dvipdfm}
\ifx\PLS@temp\PLS@driver
+ \RequirePackage{everyshi}%
+ \EveryShipout{\PLS@EveryShi}%
+ \let\PLS@EveryShi\@empty
\def\PLS@AddRotate#1{%
\ifnum#1=0
\else
- \special{pdf: put @thispage << /Rotate #1 >>}%
+ \def\PLS@EveryShi{%
+ \global\setbox\@cclv\vbox{%
+ \special{pdf: put @thispage << /Rotate #1 >>}%
+ \box\@cclv
+ }%
+ }%
\fi
}%
- \let\PLS@RemoveRotate\relax
+ \def\PLS@RemoveRotate{\let\PLS@EveryShi\@empty}%
\fi
-
-% Driver independent stuff
-%
-% The landscape environment is extended by
-% adding the correct /Rotate entries.
\g@addto@macro{\landscape}{\PLS@Rotate{90}}
\g@addto@macro{\endlandscape}{\PLS@Rotate{0}}
-
-% Main macro, that sets the /Rotate entry.
-% Argument: any TeX number or
-% nothing, that means zero.
-% Driver independent.
\def\PLS@Rotate#1{%
\begingroup
- % 1. Check and validate the argument
\PLS@CheckAngle{#1}%
- % 2. Delete an existing /Rotate entry
- \PLS@RemoveRotate
- % 3. Add /Rotate entry
- \expandafter\PLS@AddRotate\expandafter{\the\count@}%
- \endgroup
+ \expandafter\endgroup
+ \expandafter\PLS@RemoveRotate
+ \expandafter\PLS@AddRotate\expandafter{\the\count@}%
}
-
-% Validates the rotation angle.
-% The result is stored in the count register \count@.
-% Driver independent.
\def\PLS@CheckAngle#1{%
- % noting means zero:
\ifx\\#1\\%
\count@=0
\else
\count@=#1\relax
\fi
- % normalise to interval -360 < \count@ < 360
\@whilenum\count@>359\do{\addtocounter\count@ -360 }%
\@whilenum\count@<-359\do{\addtocounter\count@ 360 }%
- % check values: 0, +/-90, +/-180, +/-270
\ifnum 1=0\ifnum\count@=0 \else
\ifnum\count@=90 \else
\ifnum\count@=-90 \else
@@ -265,5 +224,6 @@
\count@=0
\fi
}
-
\endinput
+%%
+%% End of file `pdflscape.sty'.