summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/texpower/fancyexample.tex
blob: 25f93791d051b48b00f6f41d9b3164c2189811ba (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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
%%
%% This is file `fancyexample.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% texpower-doc.dtx  (with options: `fancyexample')
%% 
%% --------------------------------------------------------------
%% TeXPower bundle - dynamic online presentations with LaTeX
%% Copyright (C) 1999-2004 Stephan Lehmke
%% Copyright (C) 2003-2005 Hans Fredrik Nordhaug
%% 
%% This program is free software; you can redistribute it and/or
%% modify it under the terms of the GNU General Public License
%% as published by the Free Software Foundation; either version 2
%% of the License, or (at your option) any later version.
%% 
%% This program is distributed in the hope that it will be useful,
%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%% GNU General Public License for more details.
%% --------------------------------------------------------------
%% 
%% The list of all files belonging to the TeXPower bundle is
%% given in the file `00readme.txt'.
%% 
\ProvidesFile{fancyexample.tex}%
      [2005/04/07 TeXPower example file]

\documentclass[KOMA,letterpaper,landscape,display,calcdimensions]{powersem}

\usepackage{graphicx}

\usepackage{soul}

\usepackage{palatino}

\usepackage[ps2pdf,pdfpagemode={FullScreen}]{hyperref}
\usepackage{fixseminar}
\usepackage[whitebackground]{texpower}

\slidesmag{5}

\slideframe{none}
\pagestyle{empty}

\renewcommand{\slideleftmargin}{2cm}
\renewcommand{\sliderightmargin}{2cm}
\renewcommand{\slidetopmargin}{2cm}
\renewcommand{\slidebottommargin}{2cm}

\newcounter{nosteps}
\setcounter{nosteps}{10} % Controls the "resolution" - a value of 100 gives a *very* long compilation time.
\newcounter{mycount}

\makeatletter
\DeclareRobustCommand*\appearI[1]
{%
  \SOUL@setup
  \def\SOUL@everytoken{\makebox[\widthof{\the\SOUL@token\SOUL@setkern\SOUL@charkern}]{\scalebox{#1}{\the\SOUL@token\SOUL@setkern\SOUL@charkern}}}%
  \SOUL@%
  }%
\DeclareRobustCommand*\appearII[1]
{%
  \SOUL@setup
  \def\SOUL@everytoken{\makebox[\widthof{\the\SOUL@token\SOUL@setkern\SOUL@charkern}*\real{#1}]{\the\SOUL@token\SOUL@setkern\SOUL@charkern}}%
  \SOUL@%
  }%
\DeclareRobustCommand*\appearIII[1]
{%
  \SOUL@setup
  \def\SOUL@everyspace{\rule{.3em}{\fboxrule}}%
  \def\SOUL@everysyllable{\the\SOUL@syllable\SOUL@setkern\SOUL@charkern\rule{#1}{\fboxrule}}%
  \SOUL@%
  }%
\DeclareRobustCommand*\appearIV[1]
{%
  \SOUL@setup
  \def\SOUL@everytoken{\makebox[\widthof{\the\SOUL@token\SOUL@setkern\SOUL@charkern}+2em-2em*\real{#1}]{\scalebox{#1}{\setcounter{mycount}{\value{nosteps}*4-\value{nosteps}*4*\real{#1}}\rotatebox[origin=c]{\themycount}{\the\SOUL@token\SOUL@setkern\SOUL@charkern}}}}%
  \SOUL@%
  }%
\makeatother

\begin{document}
\begin{slide}
  \pageDuration{1}%
  \stepwise
  {%
    \begin{center}
      \movie*{\value{nosteps}}{0.01}[\pageDuration{1}]
      {%
        \makebox[0pt]
        {\rule{2\textwidth-2\textwidth/\value{nosteps}*\value{substep}}{0pt}`Twas brillig, and the slithy toves}%
        }

      \movie*{\value{nosteps}}{0.01}[\pageDuration{1}]
      {%
        \mkfactor{\mag}{\value{substep}/\value{nosteps}}%
        \scalebox{\mag}{Did gyre and gimble in the wabe:}%
        }

      \movie*{\value{nosteps}}{0.01}[\pageDuration{1}]
      {%
        \mkfactor{\mag}{5*(\value{nosteps}-\value{substep})/\value{nosteps}+1pt}%
        \makebox[0pt]{\scalebox{\mag}[1]{All mimsy were the borogoves,}}%
        }

      \movie*{\value{nosteps}}{0.01}[\pageDuration{1}]
      {%
        \mkfactor{\mag}{\value{substep}/\value{nosteps}}%
        \colorbetween[\mag]{mycolor}{textcolor}{pagecolor}
        \textcolor{mycolor}{And the mome raths outgrabe.}%
        }

      \medskip

      \movie*{\value{nosteps}}{0.01}[\pageDuration{1}]
      {%
        \mkfactor{\mag}{\value{substep}/\value{nosteps}}%
        \appearI{\mag}{"Beware the Jabberwock, my son!}%
        }

      \movie*{\value{nosteps}}{0.01}[\pageDuration{1}]
      {%
        \mkfactor{\mag}{\value{substep}/\value{nosteps}}%
        \appearII{\mag}{The jaws that bite, the claws that catch!}%
        }

      \movie{\value{nosteps}}{0.01}[\pageDuration{0.01}]
      {%
        \makebox[0pt]{\appearIII{(\thenosteps pt-\thesubstep pt)*\real{1.5}}{Beware the Jubjub bird, and shun}}%
        }%
      %
      \step{\afterstep{\pageDuration{1}}Beware the Jubjub bird, and shun}

      \movie*{\value{nosteps}}{0.01}[\pageDuration{1}]
      {%
        \mkfactor{\mag}{\value{substep}/\value{nosteps}}%
        \setcounter{mycount}{2*(\value{nosteps}-\value{substep})}%
        \strut\rotatebox[origin=c]{\themycount}{\makebox[0pt]{\smash{\scalebox{\mag}{The frumious Bandersnatch!"}}}}%
        }

      \medskip

      \movie*{\value{nosteps}}{0.01}[\pageDuration{1}]
      {%
        \mkfactor{\mag}{\value{substep}/\value{nosteps}}%
        \hspace*{\fill}%
        \emph
        {%
          \rlap
          {%
            \makebox[\widthof{Lewis Carroll}]
            {\rule{5cm-5cm/\value{nosteps}*\value{substep}}{0pt}\strut\raisebox{1cm-1cm/\value{nosteps}*\value{substep}}[0pt][0pt]{\appearIV{\mag}{Lewis Carroll}}}%
            }%
          \rlap
          {%
            \makebox[\widthof{Lewis Carroll}]
            {\strut\raisebox{1.5cm-1.5cm/\value{nosteps}*\value{substep}}[0pt][0pt]{\appearIV{\mag}{Lewis Carroll}}\rule{4cm-4cm/\value{nosteps}*\value{substep}}{0pt}}%
            }%
          \rlap
          {%
            \makebox[\widthof{Lewis Carroll}]
            {\rule{3cm-3cm/\value{nosteps}*\value{substep}}{0pt}\strut\raisebox{-.5cm+.5cm/\value{nosteps}*\value{substep}}[0pt][0pt]{\appearIV{\mag}{Lewis Carroll}}}%
            }%
          \makebox[\widthof{Lewis Carroll}]
          {\strut\raisebox{-1cm+1cm/\value{nosteps}*\value{substep}}[0pt][0pt]{\appearIV{\mag}{Lewis Carroll}}\rule{6cm-6cm/\value{nosteps}*\value{substep}}{0pt}}%
          }%
        }
    \end{center}
    }
\end{slide}
\end{document}
\endinput
%%
%% End of file `fancyexample.tex'.