summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/guide-to-latex/sempdftx.sty
blob: 278656d108bff73992f7dcb07e7742e98a3ddc6f (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
% This is sempdftx.sty
% Patrick W Daly
% March 20, 2003
% To add pdftex functionality to seminar
% Sets the pdf paper sizes as is done by hyperref,
%  so hyperref need not be loaded

\ProvidesPackage{sempdftx}[2003/03/20 v1.0 PWD]

% \pdfoutput must exist and its value must not be 0
\@ifundefined{pdfoutput}{\endinput}{%
  \ifcase\pdfoutput \endinput \fi}
%
%  Following borrowed from hpdftex.def
\AtBeginDocument{%
  \setlength{\pdfhorigin}{1truein}%
  \setlength{\pdfvorigin}{1truein}%
  \ifportrait
    \ifdim\paperwidth=\z@
    \else
      \setlength{\pdfpagewidth}{\strip@pt\paperwidth truept}%
    \fi
    \ifdim\paperheight=\z@
    \else
      \setlength{\pdfpageheight}{\strip@pt\paperheight truept}%
    \fi
  \else
    \ifdim\paperheight=\z@
    \else
      \setlength{\pdfpagewidth}{\strip@pt\paperheight truept}%
    \fi
    \ifdim\paperwidth=\z@
    \else
      \setlength{\pdfpageheight}{\strip@pt\paperwidth truept}%
    \fi
  \fi
}
\newcommand*{\pdf@revpage}{%
  \@tempdima=\pdfpagewidth
  \pdfpagewidth=\pdfpageheight
  \pdfpageheight=\@tempdima
  \@tempdima=\paperwidth
  \paperwidth=\paperheight
  \paperheight=\@tempdima
}
\ifarticle \pdf@revpage \fi       % This way, article works as for dvips
\renewcommand{\printlandscape}{}  % Prevents warning that should be printed landscape

% Would prefer to use \leftsliderotation, but that never works
% Here I just add \pdf@revpage to the slide* definition
\expandafter\let\expandafter\slide@str\csname slide*\endcsname
\@namedef{slide*}{\pdf@revpage\slide@str}

\endinput