| 1 |
%% |
| 2 |
%% This is file `pdflscape-nometadata.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% pdflscape.dtx (with options: `package') |
| 8 |
%% |
| 9 |
%% This is a generated file. |
| 10 |
%% |
| 11 |
%% Project: pdflscape |
| 12 |
%% Version: 2025-06-23 v0.14 |
| 13 |
%% |
| 14 |
%% Copyright (C) |
| 15 |
%% 2001, 2004, 2006-2008 Heiko Oberdiek |
| 16 |
%% 2016-2025 Oberdiek Package Support Group |
| 17 |
%% |
| 18 |
%% This work may be distributed and/or modified under the |
| 19 |
%% conditions of the LaTeX Project Public License, either |
| 20 |
%% version 1.3c of this license or (at your option) any later |
| 21 |
%% version. This version of this license is in |
| 22 |
%% https://www.latex-project.org/lppl/lppl-1-3c.txt |
| 23 |
%% and the latest version of this license is in |
| 24 |
%% https://www.latex-project.org/lppl.txt |
| 25 |
%% and version 1.3 or later is part of all distributions of |
| 26 |
%% LaTeX version 2005/12/01 or later. |
| 27 |
%% |
| 28 |
%% This work has the LPPL maintenance status "maintained". |
| 29 |
%% |
| 30 |
%% The Current Maintainers of this work are |
| 31 |
%% Heiko Oberdiek and the Oberdiek Package Support Group |
| 32 |
%% https://github.com/ho-tex/pdflscape/issues |
| 33 |
%% |
| 34 |
%% This work consists of the main source file pdflscape.dtx |
| 35 |
%% and the derived files |
| 36 |
%% pdflscape.sty, pdflscape-nometadata.sty, pdflscape.pdf, |
| 37 |
%% pdflscape.ins, pdflscape.drv, |
| 38 |
%% |
| 39 |
\NeedsTeXFormat{LaTeX2e} |
| 40 |
\ProvidesPackage{pdflscape-nometadata}% |
| 41 |
[2025-06-23 v0.14 Display of landscape pages in PDF (HO)] |
| 42 |
\let\PLS@option\@empty |
| 43 |
\let\PLS@driver\@empty |
| 44 |
\def\PLS@temp#1#2{% |
| 45 |
\DeclareOption{#1}{% |
| 46 |
\let\PLS@option\CurrentOption |
| 47 |
\def\PLS@driver{#2}% |
| 48 |
}% |
| 49 |
} |
| 50 |
\PLS@temp{pdftex}{pdftex} |
| 51 |
\PLS@temp{luatex}{pdftex} |
| 52 |
\PLS@temp{dvips}{dvips} |
| 53 |
\PLS@temp{dvipsone}{dvips} |
| 54 |
\PLS@temp{pctexps}{dvips} |
| 55 |
\PLS@temp{dvipdfm}{dvipdfm} |
| 56 |
\PLS@temp{dvipdfmx}{dvipdfm} |
| 57 |
\PLS@temp{xetex}{dvipdfm} |
| 58 |
\let\PLS@temp\@empty |
| 59 |
\DeclareOption*{% |
| 60 |
\ifx\PLS@temp\@empty |
| 61 |
\let\PLS@temp\CurrentOption |
| 62 |
\else |
| 63 |
\edef\PLS@temp{\PLS@temp,\CurrentOption}% |
| 64 |
\fi |
| 65 |
} |
| 66 |
\ProcessOptions* |
| 67 |
\ifx\PLS@option\@empty |
| 68 |
\else |
| 69 |
\expandafter\PassOptionsToPackage\expandafter{\PLS@option}{lscape}% |
| 70 |
\fi |
| 71 |
\ifx\PLS@temp\@empty |
| 72 |
\else |
| 73 |
\expandafter\PassOptionsToPackage\expandafter{\PLS@temp}{lscape}% |
| 74 |
\fi |
| 75 |
\RequirePackage{iftex}[2019/11/07]% |
| 76 |
\RequirePackage{lscape} |
| 77 |
\def\PLS@temp{pdftex} |
| 78 |
\ifpdf |
| 79 |
\ifx\PLS@driver\@empty |
| 80 |
\let\PLS@driver\PLS@temp |
| 81 |
\PackageInfo{pdflscape}{Auto-detected driver: \PLS@temp}% |
| 82 |
\fi |
| 83 |
\ifx\PLS@driver\PLS@temp |
| 84 |
\else |
| 85 |
\PackageError{pdflscape}{% |
| 86 |
The driver option `\PLS@option' is not compatible\MessageBreak |
| 87 |
with pdfTeX in PDF mode, using driver `pdftex' instead% |
| 88 |
}\@ehc |
| 89 |
\let\PLS@driver\PLS@temp |
| 90 |
\fi |
| 91 |
\fi |
| 92 |
\def\PLS@temp{dvipdfm} |
| 93 |
\ifxetex |
| 94 |
\ifx\PLS@driver\@empty |
| 95 |
\let\PLS@driver\PLS@temp |
| 96 |
\PackageInfo{pdflscape}{% |
| 97 |
Auto-detected driver: \PLS@temp\space(xetex)% |
| 98 |
}% |
| 99 |
\fi |
| 100 |
\ifx\PLS@driver\PLS@temp |
| 101 |
\else |
| 102 |
\PackageError{pdflscape}{% |
| 103 |
The driver option `\PLS@option' is not compatible\MessageBreak |
| 104 |
with XeTeX, using driver for XeTeX (dvipdfm) instead% |
| 105 |
}\@ehc |
| 106 |
\let\PLS@driver\PLS@temp |
| 107 |
\fi |
| 108 |
\fi |
| 109 |
\def\PLS@temp#1#2{% |
| 110 |
\ifx\PLS@driver\@empty |
| 111 |
\begingroup |
| 112 |
\def\PLS@temp{#1.def}% |
| 113 |
\expandafter\endgroup |
| 114 |
\ifx\PLS@temp\Gin@driver |
| 115 |
\def\PLS@driver{#2}% |
| 116 |
\PackageInfo{pdflscape}{% |
| 117 |
Auto-detected driver: \PLS@driver\space(#1)% |
| 118 |
}% |
| 119 |
\fi |
| 120 |
\fi |
| 121 |
} |
| 122 |
\PLS@temp{dvipdfm}{dvipdfm} |
| 123 |
\PLS@temp{dvipdfmx}{dvipdfm} |
| 124 |
\PLS@temp{dvips}{dvips} |
| 125 |
\PLS@temp{dvipsone}{dvips} |
| 126 |
\PLS@temp{pctexps}{dvips} |
| 127 |
\ifx\PLS@driver\@empty |
| 128 |
\def\PLS@temp{dvips}% |
| 129 |
\ifnum 1=0\ifx\Gin@PS@raw\@undefined |
| 130 |
\else |
| 131 |
\ifx\Gin@PS@raw\relax |
| 132 |
\else |
| 133 |
\ifx\Gin@PS@raw\@empty |
| 134 |
\else |
| 135 |
1% |
| 136 |
\fi |
| 137 |
\fi |
| 138 |
\fi |
| 139 |
\space |
| 140 |
\let\PLS@driver\PLS@temp |
| 141 |
\PackageInfo{pdflscape}{% |
| 142 |
Auto-detected driver: \PLS@temp\space(PostScript)% |
| 143 |
}% |
| 144 |
\fi |
| 145 |
\fi |
| 146 |
\ifx\PLS@driver\@empty |
| 147 |
\PackageError{pdflscape}{% |
| 148 |
Neither pdfTeX, PostScript, nor dvipdfm driver found% |
| 149 |
}\@ehc |
| 150 |
\fi |
| 151 |
\ifx\pdfpageattr\@undefined |
| 152 |
\ifx\pdfvariable\@undefined\else |
| 153 |
\protected\edef\pdfpageattr{\pdfvariable pageattr} |
| 154 |
\fi |
| 155 |
\fi |
| 156 |
\def\PLS@temp{pdftex} |
| 157 |
\ifx\PLS@temp\PLS@driver |
| 158 |
\def\PLS@AddRotate#1{% |
| 159 |
\ifnum#1=0 % |
| 160 |
\else |
| 161 |
\global\pdfpageattr\expandafter{% |
| 162 |
\the\pdfpageattr |
| 163 |
/Rotate #1% |
| 164 |
}% |
| 165 |
\fi |
| 166 |
}% |
| 167 |
\def\PLS@RemoveRotate{% |
| 168 |
\begingroup |
| 169 |
\global\pdfpageattr\expandafter{\expandafter}% |
| 170 |
\expandafter\PLS@@RemoveRotate |
| 171 |
\the\pdfpageattr /Rotate\@nil |
| 172 |
\endgroup |
| 173 |
}% |
| 174 |
\def\PLS@@RemoveRotate#1/Rotate#2\@nil{% |
| 175 |
\global\pdfpageattr\expandafter{\the\pdfpageattr#1}% |
| 176 |
\ifx\\#2\\% |
| 177 |
\else |
| 178 |
\afterassignment\PLS@@RemoveRotate |
| 179 |
\count0=#2\@nil |
| 180 |
\fi |
| 181 |
}% |
| 182 |
\fi |
| 183 |
\def\PLS@temp{dvips} |
| 184 |
\ifx\PLS@temp\PLS@driver |
| 185 |
\AddToHook{shipout/before}{\PLS@AtBeginShipout}% |
| 186 |
\let\PLS@AtBeginShipout\@empty |
| 187 |
\def\PLS@AddRotate#1{% |
| 188 |
\ifnum#1=0 % |
| 189 |
\else |
| 190 |
\def\PLS@AtBeginShipout{% |
| 191 |
\global\setbox\ShipoutBox\vbox{% |
| 192 |
\Gin@PS@raw{% |
| 193 |
[{ThisPage}\string<\string</Rotate #1\string>\string>% |
| 194 |
/PUT pdfmark% |
| 195 |
}% |
| 196 |
\box\ShipoutBox |
| 197 |
}% |
| 198 |
}% |
| 199 |
\fi |
| 200 |
}% |
| 201 |
\def\PLS@RemoveRotate{\let\PLS@AtBeginShipout\@empty}% |
| 202 |
\fi |
| 203 |
\def\PLS@temp{dvipdfm} |
| 204 |
\ifx\PLS@temp\PLS@driver |
| 205 |
\AddToHook{shipout/before}{\PLS@AtBeginShipout}% |
| 206 |
\let\PLS@AtBeginShipout\@empty |
| 207 |
\def\PLS@AddRotate#1{% |
| 208 |
\ifnum#1=0 % |
| 209 |
\else |
| 210 |
\def\PLS@AtBeginShipout{% |
| 211 |
\global\setbox\ShipoutBox\vbox{% |
| 212 |
\special{pdf: put @thispage <</Rotate #1>>}% |
| 213 |
\box\ShipoutBox |
| 214 |
}% |
| 215 |
}% |
| 216 |
\fi |
| 217 |
}% |
| 218 |
\def\PLS@RemoveRotate{\let\PLS@AtBeginShipout\@empty}% |
| 219 |
\fi |
| 220 |
\g@addto@macro{\landscape}{\PLS@Rotate{90}} |
| 221 |
\g@addto@macro{\endlandscape}{\PLS@Rotate{0}} |
| 222 |
\def\PLS@Rotate#1{% |
| 223 |
\begingroup |
| 224 |
\PLS@CheckAngle{#1}% |
| 225 |
\expandafter\endgroup |
| 226 |
\expandafter\PLS@RemoveRotate |
| 227 |
\expandafter\PLS@AddRotate\expandafter{\the\count@}% |
| 228 |
} |
| 229 |
\def\PLS@CheckAngle#1{% |
| 230 |
\ifx\\#1\\% |
| 231 |
\count@=0 % |
| 232 |
\else |
| 233 |
\count@=#1\relax |
| 234 |
\fi |
| 235 |
\@whilenum\count@>359\do{\advance\count@ -360 }% |
| 236 |
\@whilenum\count@<-359\do{\advance\count@ 360 }% |
| 237 |
\ifnum 1=0\ifnum\count@=0 \else |
| 238 |
\ifnum\count@=90 \else |
| 239 |
\ifnum\count@=-90 \else |
| 240 |
\ifnum\count@=180 \else |
| 241 |
\ifnum\count@=-180 \else |
| 242 |
\ifnum\count@=270 \else |
| 243 |
\ifnum\count@=-270 \else |
| 244 |
1\fi\fi\fi\fi\fi\fi\fi\relax |
| 245 |
\PackageError{pdflscape}{% |
| 246 |
Invalid value \the\count@\space for /Rotate% |
| 247 |
}\@ehc |
| 248 |
\count@=0 % |
| 249 |
\fi |
| 250 |
} |
| 251 |
\endinput |
| 252 |
%% |
| 253 |
%% End of file `pdflscape-nometadata.sty'. |