summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/flippdf/flippdf-1x.sty
blob: 7259a4eb343b99de50990ea1c92a414bc822f6e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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'.