diff options
author | Karl Berry <karl@freefriends.org> | 2020-10-21 21:05:56 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-10-21 21:05:56 +0000 |
commit | 35de0bfc78e7ba5a9c6cf024a6d83ef78ba2a4d5 (patch) | |
tree | e1949a62f0f0f546a9e7cf77acb27e050bdaa3ad /Master/texmf-dist | |
parent | 0de5dee4fe9404b383f7989577471dd788fc5bb0 (diff) |
flippdf (21oct20)
git-svn-id: svn://tug.org/texlive/trunk@56724 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/flippdf/flippdf.pdf | bin | 135228 -> 148556 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/flippdf/test-flippdf-1.tex | 25 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/flippdf/test-flippdf-2.tex | 25 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/flippdf/flippdf.dtx | 137 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/flippdf/flippdf.ins | 6 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/flippdf/flippdf-1x.sty | 67 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/flippdf/flippdf.sty | 22 |
7 files changed, 220 insertions, 62 deletions
diff --git a/Master/texmf-dist/doc/latex/flippdf/flippdf.pdf b/Master/texmf-dist/doc/latex/flippdf/flippdf.pdf Binary files differindex bfa6b881fa4..b60a4b14146 100644 --- a/Master/texmf-dist/doc/latex/flippdf/flippdf.pdf +++ b/Master/texmf-dist/doc/latex/flippdf/flippdf.pdf diff --git a/Master/texmf-dist/doc/latex/flippdf/test-flippdf-1.tex b/Master/texmf-dist/doc/latex/flippdf/test-flippdf-1.tex index a8c887a07f0..fe9cbcdcdcf 100644 --- a/Master/texmf-dist/doc/latex/flippdf/test-flippdf-1.tex +++ b/Master/texmf-dist/doc/latex/flippdf/test-flippdf-1.tex @@ -6,29 +6,7 @@ %% %% flippdf.dtx (with options: `test-1') %% -%% IMPORTANT NOTICE: -%% -%% Copyright 2006, 2020 -%% Sergio Callegari <sergio.callegari@gmail.com> -%% -%% --------------------------------------------- -%% This file is part of the flippdf package, -%% a contribution to the LaTeX2e system. -%% --------------------------------------------- -%% -%% This program consists of the files listed in the README file included -%% in the package. -%% -%% Any modified versions of this file must be renamed with new filenames -%% distinct from test-flippdf-1. -%% -%% For distribution of the original source see the terms for copying and -%% modification in the file flippdf.dtx. -%% -%% This generated file may be distributed as long as the original source files, as -%% listed above, are part of the same distribution. (The sources need not -%% necessarily be in the same archive or directory.) -%% + \documentclass[a4paper]{article} \usepackage{flippdf} \usepackage{lipsum} @@ -39,6 +17,7 @@ \maketitle \lipsum[1-5] \end{document} + \endinput %% %% End of file `test-flippdf-1'. diff --git a/Master/texmf-dist/doc/latex/flippdf/test-flippdf-2.tex b/Master/texmf-dist/doc/latex/flippdf/test-flippdf-2.tex index 2b08b326f31..c7f2f7d33f8 100644 --- a/Master/texmf-dist/doc/latex/flippdf/test-flippdf-2.tex +++ b/Master/texmf-dist/doc/latex/flippdf/test-flippdf-2.tex @@ -6,29 +6,7 @@ %% %% flippdf.dtx (with options: `test-2') %% -%% IMPORTANT NOTICE: -%% -%% Copyright 2006, 2020 -%% Sergio Callegari <sergio.callegari@gmail.com> -%% -%% --------------------------------------------- -%% This file is part of the flippdf package, -%% a contribution to the LaTeX2e system. -%% --------------------------------------------- -%% -%% This program consists of the files listed in the README file included -%% in the package. -%% -%% Any modified versions of this file must be renamed with new filenames -%% distinct from test-flippdf-2. -%% -%% For distribution of the original source see the terms for copying and -%% modification in the file flippdf.dtx. -%% -%% This generated file may be distributed as long as the original source files, as -%% listed above, are part of the same distribution. (The sources need not -%% necessarily be in the same archive or directory.) -%% + \documentclass[a4paper]{article} \usepackage[off]{flippdf} \usepackage{lipsum} @@ -58,6 +36,7 @@ \lipsum[7] \end{document} + \endinput %% %% End of file `test-flippdf-2'. diff --git a/Master/texmf-dist/source/latex/flippdf/flippdf.dtx b/Master/texmf-dist/source/latex/flippdf/flippdf.dtx index e329d4f2a28..3f3dde8be4e 100644 --- a/Master/texmf-dist/source/latex/flippdf/flippdf.dtx +++ b/Master/texmf-dist/source/latex/flippdf/flippdf.dtx @@ -23,7 +23,7 @@ %<*driver> \documentclass{ltxdoc} \usepackage{mathptmx} -\usepackage{helvet} +\usepackage[scaled=0.92]{helvet} \usepackage{hologo} \usepackage[T1]{fontenc} \usepackage{hypdoc} @@ -46,13 +46,15 @@ % \DoNotIndex{\paperwidth, \space, \strip@pt} % \DoNotIndex{\maketitle, \title, \lipsum} % \DoNotIndex{\thispagestyle, \relax, \setcounter, \Large, \clearpage, \bigskip} -% -% \CheckSum{40} +% \DoNotIndex{\@ifundefined, \AtBeginDocument, \endinput, \MessageBreak} +% \DoNotIndex{\PackageWarningNoLine} + +% \CheckSum{86} % % \def\filename{flippdf.dtx} -% \def\fileversion{1.1} -% \def\filedate{2020/10/17} -% \def\docdate{2020/10/17} +% \def\fileversion{2.0} +% \def\filedate{2020/10/18} +% \def\docdate{2020/10/18} % % \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package % \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option @@ -182,13 +184,127 @@ %</test-2> % \fi % +% \section{Package redesign} +% +% Until Fall 2020, \Lpack{flippdf} relied on package \Lpack{everypage} for +% its operation. Recently, functionalities similar to those offered by +% \Lpack{everypage} have been incorporated into \hologo{LaTeX} and +% \Lpack{everypage} has been deprecated, maintaining support for it just +% in view of compatibility for legacy packages still relying on it. As a +% consequence, \Lpack{flippdf} has been redesigned to take advantage of the +% new \hologo{LaTeX} features and to drop the dependence on +% \Lpack{everypage}. +% +% Version 2.0 of \Lpack{flippdf} is the result of the redesign. Version +% 1.x remains availabe las \Lpack{flippdf-1x} and modern \Lpack{flippdf} +% knows how to fallback on it when used on a \hologo{LaTeX} format missing +% the new features. +% % \StopEventually {} -% +% % \section{Implementation} % +% \subsection{Implementation of \Lpack{flippdf}} +% % \iffalse %<*flippdf> % \fi +% \changes{R2.0}{2020/10/18}{Use modern \hologo{LaTeX} features.}% +% Announce the name and version of the package, that requires +% \hologo{LaTeX2e} (actually \hologo{pdfLaTeX} or \hologo{LuaLaTeX}). +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{flippdf}% + [2020/10/18 2.0 Horizontal flipping of pages with pdfLaTeX] +% \end{macrocode} +% Depending on the actual functionalities provided by \hologo{LaTeX} +% consider loading \Lpack{flippdf-1x}. If so doing, warn about this, +% and hand over the operation to that package. +% \begin{macrocode} +\@ifundefined{AddToHook}{% + \PackageWarningNoLine{flippdf}{% + You appear to be running a version of LaTeX\MessageBreak + unsupported by current flippdf.\MessageBreak + Forcing fallback to `flippdf-1x` that\MessageBreak + uses an older code base} + \RequirePackage{flippdf-1x} + \endinput}{} +% \end{macrocode} +% State package requirements, including \Lpack{iftex} +% \begin{macrocode} +\RequirePackage{iftex} +% \end{macrocode} +% Error out if not working in PDF mode +% \begin{macrocode} +\AtBeginDocument{% + \ifpdf + \relax + \else + \PackageError{flippdf}{% + package only works in pdf output mode.}% + \fi} +% \end{macrocode} +% +% \begin{macro}{\if@sc@flippdf} +% Define a boolean variable to remember if pages are to be flipped or +% not. +% \begin{macrocode} +\newif\if@sc@flippdf +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\FlipPDF}\begin{macro}{\UnFlipPDF} +% Define the commands used to switch on and off the horizontal +% flipping of the document pages. +% \begin{macrocode} +\newcommand\FlipPDF{\@sc@flippdftrue} +\newcommand\UnFlipPDF{\@sc@flippdffalse} +% \end{macrocode} +% \end{macro}\end{macro} +% +% By default activate the flipping: +% \begin{macrocode} +\FlipPDF +% \end{macrocode} +% +% Set up the processing of options: +% \begin{macrocode} +\DeclareOption{off}{\UnFlipPDF} +\ProcessOptions +% \end{macrocode} +% +% And eventually, tell \hologo{LaTeX} to flip every page, by using the +% \Lpack{everypage} hook. First consider the case when running in +% \hologo{pdfLaTeX} +% \begin{macrocode} +\ifpdftex + \AddToHook{shipout/background}{% + \if@sc@flippdf + \pdfliteral direct {-1 0 0 1 \strip@pt\paperwidth\space 0 cm}% + \fi}% +\fi +% \end{macrocode} +% Then consider the case when running in \hologo{LuaLaTeX} +% \changes{R1.1}{2020/10/17}{Extend package to work also with +% \hologo{LuaLaTeX}.} +% \begin{macrocode} +\ifluatex + \AddToHook{shipout/background}{% + \if@sc@flippdf + \pdfextension literal direct {% + -1 0 0 1 \strip@pt\paperwidth\space 0 cm}% + \fi}% +\fi +% \end{macrocode} +% \iffalse +%</flippdf> +% \fi + + +% \subsection{Implementation of \Lpack{flippdf-1x}} +% \iffalse +%<*flippdf-1x> +% \fi % Announce the name and version of the package, that requires % \hologo{LaTeX2e} (actually \hologo{pdfLaTeX} or \hologo{LuaLaTeX}). % \changes{R1.0b}{2020/10/11}{% @@ -196,7 +312,7 @@ % release.} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{flippdf}% +\ProvidesPackage{flippdf-1x}% [2020/10/17 1.1 Horizontal flipping of pages with pdfLaTeX] % \end{macrocode} % @@ -264,12 +380,13 @@ \ifluatex \AddEverypageHook{% \if@sc@flippdf - \pdfextension literal direct {-1 0 0 1 \strip@pt\paperwidth\space 0 cm}% + \pdfextension literal direct {% + -1 0 0 1 \strip@pt\paperwidth\space 0 cm}% \fi}% \fi % \end{macrocode} % \iffalse -%</flippdf> +%</flippdf-1x> % \fi % % \Finale diff --git a/Master/texmf-dist/source/latex/flippdf/flippdf.ins b/Master/texmf-dist/source/latex/flippdf/flippdf.ins index b8f327f0b5e..b48705a2f89 100644 --- a/Master/texmf-dist/source/latex/flippdf/flippdf.ins +++ b/Master/texmf-dist/source/latex/flippdf/flippdf.ins @@ -58,6 +58,12 @@ necessarily be in the same archive or directory.) \Msg{*** Generating the LaTeX2e package files ***} \usedir{tex/latex/flippdf} \generate{\file{flippdf.sty}{\from{flippdf.dtx}{flippdf}}} +\generate{\file{flippdf-1x.sty}{\from{flippdf.dtx}{flippdf-1x}}} + +\preamble +\endpreamble + +\Msg{*** Generating the LaTeX2e test/example files ***} \usedir{doc/latex/flippdf/examples} \generate{\file{test-flippdf-1}{\from{flippdf.dtx}{test-1}}} \generate{\file{test-flippdf-2}{\from{flippdf.dtx}{test-2}}} diff --git a/Master/texmf-dist/tex/latex/flippdf/flippdf-1x.sty b/Master/texmf-dist/tex/latex/flippdf/flippdf-1x.sty new file mode 100644 index 00000000000..7259a4eb343 --- /dev/null +++ b/Master/texmf-dist/tex/latex/flippdf/flippdf-1x.sty @@ -0,0 +1,67 @@ +%% +%% This is file `flippdf-1x.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% flippdf.dtx (with options: `flippdf-1x') +%% +%% IMPORTANT NOTICE: +%% +%% Copyright 2006, 2020 +%% Sergio Callegari <sergio.callegari@gmail.com> +%% +%% --------------------------------------------- +%% This file is part of the flippdf package, +%% a contribution to the LaTeX2e system. +%% --------------------------------------------- +%% +%% This program consists of the files listed in the README file included +%% in the package. +%% +%% Any modified versions of this file must be renamed with new filenames +%% distinct from flippdf-1x.sty. +%% +%% For distribution of the original source see the terms for copying and +%% modification in the file flippdf.dtx. +%% +%% This generated file may be distributed as long as the original source files, as +%% listed above, are part of the same distribution. (The sources need not +%% necessarily be in the same archive or directory.) +%% + + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{flippdf-1x}% + [2020/10/17 1.1 Horizontal flipping of pages with pdfLaTeX] +\RequirePackage{everypage}[2007/06/20] +\RequirePackage{iftex} +\AtBeginDocument{% + \ifpdf + \relax + \else + \PackageError{flippdf}{% + package only works in pdf output mode}% + \fi} +\newif\if@sc@flippdf +\newcommand\FlipPDF{\@sc@flippdftrue} +\newcommand\UnFlipPDF{\@sc@flippdffalse} +\FlipPDF +\DeclareOption{off}{\UnFlipPDF} +\ProcessOptions +\ifpdftex + \AddEverypageHook{% + \if@sc@flippdf + \pdfliteral direct {-1 0 0 1 \strip@pt\paperwidth\space 0 cm}% + \fi}% +\fi +\ifluatex + \AddEverypageHook{% + \if@sc@flippdf + \pdfextension literal direct {% + -1 0 0 1 \strip@pt\paperwidth\space 0 cm}% + \fi}% +\fi +\endinput +%% +%% End of file `flippdf-1x.sty'. diff --git a/Master/texmf-dist/tex/latex/flippdf/flippdf.sty b/Master/texmf-dist/tex/latex/flippdf/flippdf.sty index 42b7aaaf4aa..0fac07c8963 100644 --- a/Master/texmf-dist/tex/latex/flippdf/flippdf.sty +++ b/Master/texmf-dist/tex/latex/flippdf/flippdf.sty @@ -29,17 +29,25 @@ %% listed above, are part of the same distribution. (The sources need not %% necessarily be in the same archive or directory.) %% + \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{flippdf}% - [2020/10/17 1.1 Horizontal flipping of pages with pdfLaTeX] -\RequirePackage{everypage}[2007/06/20] + [2020/10/18 2.0 Horizontal flipping of pages with pdfLaTeX] +\@ifundefined{AddToHook}{% + \PackageWarningNoLine{flippdf}{% + You appear to be running a version of LaTeX\MessageBreak + unsupported by current flippdf.\MessageBreak + Forcing fallback to `flippdf-1x` that\MessageBreak + uses an older code base} + \RequirePackage{flippdf-1x} + \endinput}{} \RequirePackage{iftex} \AtBeginDocument{% \ifpdf \relax \else \PackageError{flippdf}{% - package only works in pdf output mode}% + package only works in pdf output mode.}% \fi} \newif\if@sc@flippdf \newcommand\FlipPDF{\@sc@flippdftrue} @@ -48,17 +56,19 @@ \DeclareOption{off}{\UnFlipPDF} \ProcessOptions \ifpdftex - \AddEverypageHook{% + \AddToHook{shipout/background}{% \if@sc@flippdf \pdfliteral direct {-1 0 0 1 \strip@pt\paperwidth\space 0 cm}% \fi}% \fi \ifluatex - \AddEverypageHook{% + \AddToHook{shipout/background}{% \if@sc@flippdf - \pdfextension literal direct {-1 0 0 1 \strip@pt\paperwidth\space 0 cm}% + \pdfextension literal direct {% + -1 0 0 1 \strip@pt\paperwidth\space 0 cm}% \fi}% \fi + \endinput %% %% End of file `flippdf.sty'. |