File: present-transitions.tex

package info (click to toggle)
texlive-extra 2020.20210202-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,974,756 kB
  • sloc: perl: 208,744; cs: 25,850; python: 22,859; sh: 16,844; makefile: 15,571; ansic: 13,649; java: 12,741; xml: 4,930; lisp: 1,708; javascript: 1,351; csh: 1,129; ruby: 938; awk: 151; tcl: 142; cpp: 41; sed: 36; pascal: 18
file content (53 lines) | stat: -rw-r--r-- 1,237 bytes parent folder | download | duplicates (5)
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
%
%
% present-transitions.tex
%
% Author: Matthias Meister (tex@flamma-mentis.eu)
% Version 1.0, April 2012
%
% This file is part of a work distributed under the LaTeX Project Public License.
% The macros in this file are a supplement to the macros in present.tex.
%
\catcode`\@=11
\let\simplelink=\link
\let\simplelinkarea=\linkarea
\let\simplepagelink=\pagelink

\def\Tr@ns{Push}
\def\D@r{2}

\def\tl@nk#1#2{%
\pdfstartlink attr {/Border [0 0 0]} user {/Subtype /Link /A <</S /GoTo /D /#1 /Next <</S /Trans /Trans << /S /\Tr@ns /D \D@r >> >> >>}#2%
\pdfendlink}

\def\tl@nkarea#1#2#3#4{%
\pdfannot{%
/Subtype /Link
/Rect [#2]
/Border [0 0 #3]
/C [#4]
/A << /S /GoTo /D (#1) /Next << /S /Trans /Trans << /S /\Tr@ns /D \D@r >> >> >>}}

\def\tpagel@nk#1#2{%
\pdfstartlink    
attr {/Border [0 0 0]} user {/Subtype /Link /A <</S /Named /N /#1 /Next << /S /Trans /Trans << /S /\Tr@ns /D \D@r>> >> >>}%
#2%
\pdfendlink}

\def\NoTrans{%
\global\let\link=\simplelink
\global\let\pagelink=\simplepagelink
\global\let\linkarea=\simplelinkarea
}

\def\UseTrans{%
\global\let\link=\tl@nk
\global\let\pagelink=\tpagel@nk
\global\let\linkarea=\tl@nkarea
}

\def\SetDuration#1{\gdef\D@r{#1}}
\def\SetTrans#1{\gdef\Tr@ns{#1}}

\NoTrans
\catcode`\@=12