summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/flippdf
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-10-21 21:05:56 +0000
committerKarl Berry <karl@freefriends.org>2020-10-21 21:05:56 +0000
commit35de0bfc78e7ba5a9c6cf024a6d83ef78ba2a4d5 (patch)
treee1949a62f0f0f546a9e7cf77acb27e050bdaa3ad /Master/texmf-dist/tex/latex/flippdf
parent0de5dee4fe9404b383f7989577471dd788fc5bb0 (diff)
flippdf (21oct20)
git-svn-id: svn://tug.org/texlive/trunk@56724 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/flippdf')
-rw-r--r--Master/texmf-dist/tex/latex/flippdf/flippdf-1x.sty67
-rw-r--r--Master/texmf-dist/tex/latex/flippdf/flippdf.sty22
2 files changed, 83 insertions, 6 deletions
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'.