diff options
author | Karl Berry <karl@freefriends.org> | 2022-10-29 19:49:11 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-10-29 19:49:11 +0000 |
commit | 7f60206420bf17ee49721e3ea3bddc11834c37b1 (patch) | |
tree | 09304bd724c356da7c76a09d47f7ae41b1a27b5c /Master/texmf-dist/tex | |
parent | da2983eaf28cbe959300f10351f8105a83d74a0a (diff) |
pdflscape (29oct22)
git-svn-id: svn://tug.org/texlive/trunk@64851 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/pdflscape/pdflscape-nometadata.sty | 253 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/pdflscape/pdflscape.sty | 249 |
2 files changed, 284 insertions, 218 deletions
diff --git a/Master/texmf-dist/tex/latex/pdflscape/pdflscape-nometadata.sty b/Master/texmf-dist/tex/latex/pdflscape/pdflscape-nometadata.sty new file mode 100644 index 00000000000..30ad20a6e93 --- /dev/null +++ b/Master/texmf-dist/tex/latex/pdflscape/pdflscape-nometadata.sty @@ -0,0 +1,253 @@ +%% +%% This is file `pdflscape-nometadata.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pdflscape.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Project: pdflscape +%% Version: 2022-10-28 v0.13 +%% +%% Copyright (C) +%% 2001, 2004, 2006-2008 Heiko Oberdiek +%% 2016-2022 Oberdiek Package Support Group +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3c of this license or (at your option) any later +%% version. This version of this license is in +%% https://www.latex-project.org/lppl/lppl-1-3c.txt +%% and the latest version of this license is in +%% https://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 Maintainers of this work are +%% Heiko Oberdiek and the Oberdiek Package Support Group +%% https://github.com/ho-tex/pdflscape/issues +%% +%% This work consists of the main source file pdflscape.dtx +%% and the derived files +%% pdflscape.sty, pdflscape-nometadata.sty, pdflscape.pdf, +%% pdflscape.ins, pdflscape.drv, +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{pdflscape-nometadata}% + [2022-10-28 v0.13 Display of landscape pages in PDF (HO)] +\let\PLS@option\@empty +\let\PLS@driver\@empty +\def\PLS@temp#1#2{% + \DeclareOption{#1}{% + \let\PLS@option\CurrentOption + \def\PLS@driver{#2}% + }% +} +\PLS@temp{pdftex}{pdftex} +\PLS@temp{luatex}{pdftex} +\PLS@temp{dvips}{dvips} +\PLS@temp{dvipsone}{dvips} +\PLS@temp{pctexps}{dvips} +\PLS@temp{dvipdfm}{dvipdfm} +\PLS@temp{dvipdfmx}{dvipdfm} +\PLS@temp{xetex}{dvipdfm} +\let\PLS@temp\@empty +\DeclareOption*{% + \ifx\PLS@temp\@empty + \let\PLS@temp\CurrentOption + \else + \edef\PLS@temp{\PLS@temp,\CurrentOption}% + \fi +} +\ProcessOptions* +\ifx\PLS@option\@empty +\else + \expandafter\PassOptionsToPackage\expandafter{\PLS@option}{lscape}% +\fi +\ifx\PLS@temp\@empty +\else + \expandafter\PassOptionsToPackage\expandafter{\PLS@temp}{lscape}% +\fi +\RequirePackage{iftex}[2019/11/07]% +\RequirePackage{lscape} +\def\PLS@temp{pdftex} +\ifpdf + \ifx\PLS@driver\@empty + \let\PLS@driver\PLS@temp + \PackageInfo{pdflscape}{Auto-detected driver: \PLS@temp}% + \fi + \ifx\PLS@driver\PLS@temp + \else + \PackageError{pdflscape}{% + The driver option `\PLS@option' is not compatible\MessageBreak + with pdfTeX in PDF mode, using driver `pdftex' instead% + }\@ehc + \let\PLS@driver\PLS@temp + \fi +\fi +\def\PLS@temp{dvipdfm} +\ifxetex + \ifx\PLS@driver\@empty + \let\PLS@driver\PLS@temp + \PackageInfo{pdflscape}{% + Auto-detected driver: \PLS@temp\space(xetex)% + }% + \fi + \ifx\PLS@driver\PLS@temp + \else + \PackageError{pdflscape}{% + The driver option `\PLS@option' is not compatible\MessageBreak + with XeTeX, using driver for XeTeX (dvipdfm) instead% + }\@ehc + \let\PLS@driver\PLS@temp + \fi +\fi +\def\PLS@temp#1#2{% + \ifx\PLS@driver\@empty + \begingroup + \def\PLS@temp{#1.def}% + \expandafter\endgroup + \ifx\PLS@temp\Gin@driver + \def\PLS@driver{#2}% + \PackageInfo{pdflscape}{% + Auto-detected driver: \PLS@driver\space(#1)% + }% + \fi + \fi +} +\PLS@temp{dvipdfm}{dvipdfm} +\PLS@temp{dvipdfmx}{dvipdfm} +\PLS@temp{dvips}{dvips} +\PLS@temp{dvipsone}{dvips} +\PLS@temp{pctexps}{dvips} +\ifx\PLS@driver\@empty + \def\PLS@temp{dvips}% + \ifnum 1=0\ifx\Gin@PS@raw\@undefined + \else + \ifx\Gin@PS@raw\relax + \else + \ifx\Gin@PS@raw\@empty + \else + 1% + \fi + \fi + \fi + \space + \let\PLS@driver\PLS@temp + \PackageInfo{pdflscape}{% + Auto-detected driver: \PLS@temp\space(PostScript)% + }% + \fi +\fi +\ifx\PLS@driver\@empty + \PackageError{pdflscape}{% + Neither pdfTeX, PostScript, nor dvipdfm driver found% + }\@ehc +\fi +\ifx\pdfpageattr\@undefined + \ifx\pdfvariable\@undefined\else + \protected\edef\pdfpageattr{\pdfvariable pageattr} + \fi +\fi +\def\PLS@temp{pdftex} +\ifx\PLS@temp\PLS@driver + \def\PLS@AddRotate#1{% + \ifnum#1=0 % + \else + \global\pdfpageattr\expandafter{% + \the\pdfpageattr + /Rotate #1% + }% + \fi + }% + \def\PLS@RemoveRotate{% + \begingroup + \global\pdfpageattr\expandafter{\expandafter}% + \expandafter\PLS@@RemoveRotate + \the\pdfpageattr /Rotate\@nil + \endgroup + }% + \def\PLS@@RemoveRotate#1/Rotate#2\@nil{% + \global\pdfpageattr\expandafter{\the\pdfpageattr#1}% + \ifx\\#2\\% + \else + \afterassignment\PLS@@RemoveRotate + \count0=#2\@nil + \fi + }% +\fi +\def\PLS@temp{dvips} +\ifx\PLS@temp\PLS@driver + \AddToHook{shipout/before}{\PLS@AtBeginShipout}% + \let\PLS@AtBeginShipout\@empty + \def\PLS@AddRotate#1{% + \ifnum#1=0 % + \else + \def\PLS@AtBeginShipout{% + \global\setbox\ShipoutBox\vbox{% + \Gin@PS@raw{% + [{ThisPage}\string<\string</Rotate #1\string>\string>% + /PUT pdfmark% + }% + \box\ShipoutBox + }% + }% + \fi + }% + \def\PLS@RemoveRotate{\let\PLS@AtBeginShipout\@empty}% +\fi +\def\PLS@temp{dvipdfm} +\ifx\PLS@temp\PLS@driver + \AddToHook{shipout/before}{\PLS@AtBeginShipout}% + \let\PLS@AtBeginShipout\@empty + \def\PLS@AddRotate#1{% + \ifnum#1=0 % + \else + \def\PLS@AtBeginShipout{% + \global\setbox\ShipoutBox\vbox{% + \special{pdf: put @thispage <</Rotate #1>>}% + \box\ShipoutBox + }% + }% + \fi + }% + \def\PLS@RemoveRotate{\let\PLS@AtBeginShipout\@empty}% +\fi +\g@addto@macro{\landscape}{\PLS@Rotate{90}} +\g@addto@macro{\endlandscape}{\PLS@Rotate{0}} +\def\PLS@Rotate#1{% + \begingroup + \PLS@CheckAngle{#1}% + \expandafter\endgroup + \expandafter\PLS@RemoveRotate + \expandafter\PLS@AddRotate\expandafter{\the\count@}% +} +\def\PLS@CheckAngle#1{% + \ifx\\#1\\% + \count@=0 % + \else + \count@=#1\relax + \fi + \@whilenum\count@>359\do{\advance\count@ -360 }% + \@whilenum\count@<-359\do{\advance\count@ 360 }% + \ifnum 1=0\ifnum\count@=0 \else + \ifnum\count@=90 \else + \ifnum\count@=-90 \else + \ifnum\count@=180 \else + \ifnum\count@=-180 \else + \ifnum\count@=270 \else + \ifnum\count@=-270 \else + 1\fi\fi\fi\fi\fi\fi\fi\relax + \PackageError{pdflscape}{% + Invalid value \the\count@\space for /Rotate% + }\@ehc + \count@=0 % + \fi +} +\endinput +%% +%% End of file `pdflscape-nometadata.sty'. diff --git a/Master/texmf-dist/tex/latex/pdflscape/pdflscape.sty b/Master/texmf-dist/tex/latex/pdflscape/pdflscape.sty index 45a9bad5bd8..e1dc90f96f9 100644 --- a/Master/texmf-dist/tex/latex/pdflscape/pdflscape.sty +++ b/Master/texmf-dist/tex/latex/pdflscape/pdflscape.sty @@ -4,16 +4,16 @@ %% %% The original source files were: %% -%% pdflscape.dtx (with options: `package') +%% pdflscape.dtx (with options: `package-new') %% %% This is a generated file. %% %% Project: pdflscape -%% Version: 2019/12/05 v0.12 +%% Version: 2022-10-28 v0.13 %% %% Copyright (C) %% 2001, 2004, 2006-2008 Heiko Oberdiek -%% 2016-2019 Oberdiek Package Support Group +%% 2016-2022 Oberdiek Package Support Group %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -31,225 +31,38 @@ %% Heiko Oberdiek and the Oberdiek Package Support Group %% https://github.com/ho-tex/pdflscape/issues %% -%% %% This work consists of the main source file pdflscape.dtx %% and the derived files -%% pdflscape.sty, pdflscape.pdf, pdflscape.ins, pdflscape.drv, +%% pdflscape.sty, pdflscape-nometadata.sty, pdflscape.pdf, +%% pdflscape.ins, pdflscape.drv, %% -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{pdflscape}% - [2019/12/05 v0.12 Display of landscape pages in PDF (HO)] -\let\PLS@option\@empty -\let\PLS@driver\@empty -\def\PLS@temp#1#2{% - \DeclareOption{#1}{% - \let\PLS@option\CurrentOption - \def\PLS@driver{#2}% - }% -} -\PLS@temp{pdftex}{pdftex} -\PLS@temp{luatex}{pdftex} -\PLS@temp{dvips}{dvips} -\PLS@temp{dvipsone}{dvips} -\PLS@temp{pctexps}{dvips} -\PLS@temp{dvipdfm}{dvipdfm} -\PLS@temp{dvipdfmx}{dvipdfm} -\PLS@temp{xetex}{dvipdfm} -\let\PLS@temp\@empty -\DeclareOption*{% - \ifx\PLS@temp\@empty - \let\PLS@temp\CurrentOption - \else - \edef\PLS@temp{\PLS@temp,\CurrentOption}% - \fi -} -\ProcessOptions* -\ifx\PLS@option\@empty -\else - \expandafter\PassOptionsToPackage\expandafter{\PLS@option}{lscape}% -\fi -\ifx\PLS@temp\@empty -\else - \expandafter\PassOptionsToPackage\expandafter{\PLS@temp}{lscape}% -\fi -\RequirePackage{iftex}[2019/11/07]% +\NeedsTeXFormat{LaTeX2e}[2020/10/01] +\ProvidesExplPackage{pdflscape}{2022-10-27}{0.13} + {Display of landscape pages in PDF}% +\@ifl@t@r\fmtversion{2022-06-01} + { + \IfDocumentMetadataTF {}{\RequirePackageWithOptions{pdflscape-nometadata}} + \IfDocumentMetadataTF {}{\endinput} + } + {\RequirePackageWithOptions{pdflscape-nometadata}} +\DeclareOption*{\PassOptionsToPackage\CurrentOption{graphics}} +\ProcessOptions \RequirePackage{lscape} -\def\PLS@temp{pdftex} -\ifpdf - \ifx\PLS@driver\@empty - \let\PLS@driver\PLS@temp - \PackageInfo{pdflscape}{Auto-detected driver: \PLS@temp}% - \fi - \ifx\PLS@driver\PLS@temp - \else - \PackageError{pdflscape}{% - The driver option `\PLS@option' is not compatible\MessageBreak - with pdfTeX in PDF mode, using driver `pdftex' instead% - }\@ehc - \let\PLS@driver\PLS@temp - \fi -\fi -\def\PLS@temp{dvipdfm} -\ifxetex - \ifx\PLS@driver\@empty - \let\PLS@driver\PLS@temp - \PackageInfo{pdflscape}{% - Auto-detected driver: \PLS@temp\space(xetex)% - }% - \fi - \ifx\PLS@driver\PLS@temp - \else - \PackageError{pdflscape}{% - The driver option `\PLS@option' is not compatible\MessageBreak - with XeTeX, using driver for XeTeX (dvipdfm) instead% - }\@ehc - \let\PLS@driver\PLS@temp - \fi -\fi -\def\PLS@temp#1#2{% - \ifx\PLS@driver\@empty - \begingroup - \def\PLS@temp{#1.def}% - \expandafter\endgroup - \ifx\PLS@temp\Gin@driver - \def\PLS@driver{#2}% - \PackageInfo{pdflscape}{% - Auto-detected driver: \PLS@driver\space(#1)% - }% - \fi - \fi -} -\PLS@temp{dvipdfm}{dvipdfm} -\PLS@temp{dvipdfmx}{dvipdfm} -\PLS@temp{dvips}{dvips} -\PLS@temp{dvipsone}{dvips} -\PLS@temp{pctexps}{dvips} -\ifx\PLS@driver\@empty - \def\PLS@temp{dvips}% - \ifnum 1=0\ifx\Gin@PS@raw\@undefined - \else - \ifx\Gin@PS@raw\relax - \else - \ifx\Gin@PS@raw\@empty - \else - 1% - \fi - \fi - \fi - \space - \let\PLS@driver\PLS@temp - \PackageInfo{pdflscape}{% - Auto-detected driver: \PLS@temp\space(PostScript)% - }% - \fi -\fi -\ifx\PLS@driver\@empty - \PackageError{pdflscape}{% - Neither pdfTeX, PostScript, nor dvipdfm driver found% - }\@ehc -\fi -\ifx\pdfpageattr\@undefined - \ifx\pdfvariable\@undefined\else - \protected\edef\pdfpageattr{\pdfvariable pageattr} - \fi -\fi -\def\PLS@temp{pdftex} -\ifx\PLS@temp\PLS@driver - \def\PLS@AddRotate#1{% - \ifnum#1=0 % - \else - \global\pdfpageattr\expandafter{% - \the\pdfpageattr - /Rotate #1% - }% - \fi - }% - \def\PLS@RemoveRotate{% - \begingroup - \global\pdfpageattr\expandafter{\expandafter}% - \expandafter\PLS@@RemoveRotate - \the\pdfpageattr /Rotate\@nil - \endgroup - }% - \def\PLS@@RemoveRotate#1/Rotate#2\@nil{% - \global\pdfpageattr\expandafter{\the\pdfpageattr#1}% - \ifx\\#2\\% - \else - \afterassignment\PLS@@RemoveRotate - \count0=#2\@nil - \fi - }% -\fi -\def\PLS@temp{dvips} -\ifx\PLS@temp\PLS@driver - \RequirePackage{atbegshi}% - \AtBeginShipout{\PLS@AtBeginShipout}% - \let\PLS@AtBeginShipout\@empty - \def\PLS@AddRotate#1{% - \ifnum#1=0 % - \else - \def\PLS@AtBeginShipout{% - \global\setbox\AtBeginShipoutBox\vbox{% - \Gin@PS@raw{% - [{ThisPage}\string<\string</Rotate #1\string>\string>% - /PUT pdfmark% - }% - \box\AtBeginShipoutBox - }% - }% - \fi - }% - \def\PLS@RemoveRotate{\let\PLS@AtBeginShipout\@empty}% -\fi -\def\PLS@temp{dvipdfm} -\ifx\PLS@temp\PLS@driver - \RequirePackage{atbegshi}% - \AtBeginShipout{\PLS@AtBeginShipout}% - \let\PLS@AtBeginShipout\@empty - \def\PLS@AddRotate#1{% - \ifnum#1=0 % - \else - \def\PLS@AtBeginShipout{% - \global\setbox\AtBeginShipoutBox\vbox{% - \special{pdf: put @thispage <</Rotate #1>>}% - \box\AtBeginShipoutBox - }% - }% - \fi - }% - \def\PLS@RemoveRotate{\let\PLS@AtBeginShipout\@empty}% -\fi -\g@addto@macro{\landscape}{\PLS@Rotate{90}} -\g@addto@macro{\endlandscape}{\PLS@Rotate{0}} -\def\PLS@Rotate#1{% - \begingroup - \PLS@CheckAngle{#1}% - \expandafter\endgroup - \expandafter\PLS@RemoveRotate - \expandafter\PLS@AddRotate\expandafter{\the\count@}% -} -\def\PLS@CheckAngle#1{% - \ifx\\#1\\% - \count@=0 % - \else - \count@=#1\relax - \fi - \@whilenum\count@>359\do{\advance\count@ -360 }% - \@whilenum\count@<-359\do{\advance\count@ 360 }% - \ifnum 1=0\ifnum\count@=0 \else - \ifnum\count@=90 \else - \ifnum\count@=-90 \else - \ifnum\count@=180 \else - \ifnum\count@=-180 \else - \ifnum\count@=270 \else - \ifnum\count@=-270 \else - 1\fi\fi\fi\fi\fi\fi\fi\relax - \PackageError{pdflscape}{% - Invalid value \the\count@\space for /Rotate% - }\@ehc - \count@=0 % - \fi -} + +\tl_new:N\g__pdflscape_saverotate_tl +\hook_gput_code:nnn {env/landscape/begin}{pdflscape} + { + \pdfmanagement_get:nnN {Page}{Rotate}\l_tmpa_tl + \tl_gset_eq:NN\g__pdflscape_saverotate_tl\l_tmpa_tl + \clearpage + \pdfmanagement_add:nnn{Page}{Rotate}{90} + } +\hook_gput_code:nnn {env/landscape/after}{pdflscape} + { + \quark_if_no_value:NTF\g__pdflscape_saverotate_tl + {\pdfmanagement_remove:nn{Page}{Rotate}} + {\pdfmanagement_add:nnx{Page}{Rotate}{\g__pdflscape_saverotate_tl}} + } \endinput %% %% End of file `pdflscape.sty'. |