texlive[56724] Master/texmf-dist: flippdf (21oct20)
commits+karl at tug.org
commits+karl at tug.org
Wed Oct 21 23:05:56 CEST 2020
Revision: 56724
http://tug.org/svn/texlive?view=revision&revision=56724
Author: karl
Date: 2020-10-21 23:05:56 +0200 (Wed, 21 Oct 2020)
Log Message:
-----------
flippdf (21oct20)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/flippdf/flippdf.pdf
trunk/Master/texmf-dist/doc/latex/flippdf/test-flippdf-1.tex
trunk/Master/texmf-dist/doc/latex/flippdf/test-flippdf-2.tex
trunk/Master/texmf-dist/source/latex/flippdf/flippdf.dtx
trunk/Master/texmf-dist/source/latex/flippdf/flippdf.ins
trunk/Master/texmf-dist/tex/latex/flippdf/flippdf.sty
Added Paths:
-----------
trunk/Master/texmf-dist/tex/latex/flippdf/flippdf-1x.sty
Modified: trunk/Master/texmf-dist/doc/latex/flippdf/flippdf.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/flippdf/test-flippdf-1.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/flippdf/test-flippdf-1.tex 2020-10-21 21:04:55 UTC (rev 56723)
+++ trunk/Master/texmf-dist/doc/latex/flippdf/test-flippdf-1.tex 2020-10-21 21:05:56 UTC (rev 56724)
@@ -6,29 +6,7 @@
%%
%% flippdf.dtx (with options: `test-1')
%%
-%% IMPORTANT NOTICE:
-%%
-%% Copyright 2006, 2020
-%% Sergio Callegari <sergio.callegari at 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'.
Modified: trunk/Master/texmf-dist/doc/latex/flippdf/test-flippdf-2.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/flippdf/test-flippdf-2.tex 2020-10-21 21:04:55 UTC (rev 56723)
+++ trunk/Master/texmf-dist/doc/latex/flippdf/test-flippdf-2.tex 2020-10-21 21:05:56 UTC (rev 56724)
@@ -6,29 +6,7 @@
%%
%% flippdf.dtx (with options: `test-2')
%%
-%% IMPORTANT NOTICE:
-%%
-%% Copyright 2006, 2020
-%% Sergio Callegari <sergio.callegari at 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'.
Modified: trunk/Master/texmf-dist/source/latex/flippdf/flippdf.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/flippdf/flippdf.dtx 2020-10-21 21:04:55 UTC (rev 56723)
+++ trunk/Master/texmf-dist/source/latex/flippdf/flippdf.dtx 2020-10-21 21:05:56 UTC (rev 56724)
@@ -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 at pt}
% \DoNotIndex{\maketitle, \title, \lipsum}
% \DoNotIndex{\thispagestyle, \relax, \setcounter, \Large, \clearpage, \bigskip}
+% \DoNotIndex{\@ifundefined, \AtBeginDocument, \endinput, \MessageBreak}
+% \DoNotIndex{\PackageWarningNoLine}
+
+% \CheckSum{86}
%
-% \CheckSum{40}
-%
% \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,21 +184,135 @@
%</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 at sc@flippdf}
+% Define a boolean variable to remember if pages are to be flipped or
+% not.
+% \begin{macrocode}
+\newif\if at 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 at flippdftrue}
+\newcommand\UnFlipPDF{\@sc at 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 at sc@flippdf
+ \pdfliteral direct {-1 0 0 1 \strip at 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 at sc@flippdf
+ \pdfextension literal direct {%
+ -1 0 0 1 \strip at 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}{%
% Require \Lpack{everypage} package to be at least at its 2007/06/20 (R1.1)
% 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 at sc@flippdf
- \pdfextension literal direct {-1 0 0 1 \strip at pt\paperwidth\space 0 cm}%
+ \pdfextension literal direct {%
+ -1 0 0 1 \strip at pt\paperwidth\space 0 cm}%
\fi}%
\fi
% \end{macrocode}
% \iffalse
-%</flippdf>
+%</flippdf-1x>
% \fi
%
% \Finale
Modified: trunk/Master/texmf-dist/source/latex/flippdf/flippdf.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/flippdf/flippdf.ins 2020-10-21 21:04:55 UTC (rev 56723)
+++ trunk/Master/texmf-dist/source/latex/flippdf/flippdf.ins 2020-10-21 21:05:56 UTC (rev 56724)
@@ -58,6 +58,12 @@
\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}}}
Added: trunk/Master/texmf-dist/tex/latex/flippdf/flippdf-1x.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/flippdf/flippdf-1x.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/flippdf/flippdf-1x.sty 2020-10-21 21:05:56 UTC (rev 56724)
@@ -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 at 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 at sc@flippdf
+\newcommand\FlipPDF{\@sc at flippdftrue}
+\newcommand\UnFlipPDF{\@sc at flippdffalse}
+\FlipPDF
+\DeclareOption{off}{\UnFlipPDF}
+\ProcessOptions
+\ifpdftex
+ \AddEverypageHook{%
+ \if at sc@flippdf
+ \pdfliteral direct {-1 0 0 1 \strip at pt\paperwidth\space 0 cm}%
+ \fi}%
+\fi
+\ifluatex
+ \AddEverypageHook{%
+ \if at sc@flippdf
+ \pdfextension literal direct {%
+ -1 0 0 1 \strip at pt\paperwidth\space 0 cm}%
+ \fi}%
+\fi
+\endinput
+%%
+%% End of file `flippdf-1x.sty'.
Property changes on: trunk/Master/texmf-dist/tex/latex/flippdf/flippdf-1x.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/flippdf/flippdf.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/flippdf/flippdf.sty 2020-10-21 21:04:55 UTC (rev 56723)
+++ trunk/Master/texmf-dist/tex/latex/flippdf/flippdf.sty 2020-10-21 21:05:56 UTC (rev 56724)
@@ -29,10 +29,18 @@
%% 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
@@ -39,7 +47,7 @@
\relax
\else
\PackageError{flippdf}{%
- package only works in pdf output mode}%
+ package only works in pdf output mode.}%
\fi}
\newif\if at sc@flippdf
\newcommand\FlipPDF{\@sc at flippdftrue}
@@ -48,17 +56,19 @@
\DeclareOption{off}{\UnFlipPDF}
\ProcessOptions
\ifpdftex
- \AddEverypageHook{%
+ \AddToHook{shipout/background}{%
\if at sc@flippdf
\pdfliteral direct {-1 0 0 1 \strip at pt\paperwidth\space 0 cm}%
\fi}%
\fi
\ifluatex
- \AddEverypageHook{%
+ \AddToHook{shipout/background}{%
\if at sc@flippdf
- \pdfextension literal direct {-1 0 0 1 \strip at pt\paperwidth\space 0 cm}%
+ \pdfextension literal direct {%
+ -1 0 0 1 \strip at pt\paperwidth\space 0 cm}%
\fi}%
\fi
+
\endinput
%%
%% End of file `flippdf.sty'.
More information about the tex-live-commits
mailing list.