summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/generic/xypic/xymovie.doc
blob: a2b891243d42c63640ef71e251f917ffac162e3c (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
%% $Id: xymovie.doc,v 3.5 1997/05/28 13:05:01 krisrose Exp $
%%
%% Xy-pic ``Movie Storyboard extension'' option.
%% Copyright (c) 1996-1997	Kristoffer H. Rose	<krisrose@brics.dk>
%%
%% This file is part of the Xy-pic package for graphs and diagrams in TeX.
%% See the companion README and INSTALL files for further information.
%% Copyright (c) 1991-1997	Kristoffer H. Rose	<krisrose@brics.dk>
%%
%% The Xy-pic package 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.
%%
%% The Xy-pic package 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.
%%
%% You should have received a copy of the GNU General Public License along
%% with this package; if not, write to the Free Software Foundation, Inc.,
%% 675 Mass Ave, Cambridge, MA 02139, USA.
%%
\ifx\xyloaded\undefined \input xy \fi

\xyprovide{movie}{Movie Storyboard extension}{\stripRCS$Revision: 3.5 $}%
 {Kristoffer H.~Rose}{krisrose@brics.dk}%
 {BRICS/Computer Science, University of Aarhus, Ny Munkegade, building 540,
  DK--8000 Aarhus~C}

\DOCMODE3%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

	This extension interprets the ??c![\scene] primitive of the
	??c![movie] class, setting the progress indicators to dummy values.
	The following assumes that your are familiar with the |movie| class.

\DOCMODE2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\paragraph*{Header:}\leavevmode
\DOCHEADER
\DOCMODE3%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

	The size of the frame is determined by the command
%
\begin{defs1}
??c![\MovieSetup]|{width=|"width"|,height=|"height"|,|\dots|}|
\end{defs1}
\noindent\unskip
%
	(the \dots\ indicate the other arguments required by the |movie|
	class but silently ignored by the \Xy-pic |movie| extension).

        \NOTE: This extension still experimental and subject to change.  The
	only documentation is in the |movie.cls| source file.

\DOCMODE2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

	The implementation mimics the aspects of the |keyval| package needed
	here, namely reading the ??c![height] and ??c![width] parameters.

\DOCMODE(
\xynew@{dimen}\m@height
\xynew@{dimen}\m@width

\xydef@\extractparameterm@#1#2#3{%
 \DN@##1,#1=##2,##3@{\csname m@#1\endcsname=##2\relax}%
 \next@,#2,#3,@}

\xydef@\MovieSetup#1{%
 \extractparameterm@{height}{#1}{height=2in}%
 \extractparameterm@{width}{#1}{width=2in}%
}
\DOCMODE)

	The progress macros all default to

\DOCMODE(
\xydef@\theScene{0}
\xydef@\theF{0}
\xydef@\theFr{1}
\xydef@\F#1{#1(0)}
\xydef@\Fr#1{#1(1)}
\DOCMODE)

	We need to interpret and ignore the arguments to |\scene| except the
	|*| which is used on the last scene since this means that we should
	output the scene with progress values corresponding to ``The End''.

\DOCMODE(
\xynew@{if}\iflastframe@
\xynew@{count}\m@scene

\xydef@\scene{\advance\m@scene\@ne
 \DN@{\ifx*\next \lastframe@true \DN@*{\xyFN@\scene@}%
  \else \let\next@=\scene@ \fi \next@}%
 \xyFN@\next@}

\xydef@\scene@{%
 \ifx[\next \DN@[##1]{\scene@i}\else \let\next@=\scene@i \fi \next@}

\long\def\scene@i#1{{%
%
  \def\caption##1{\gdef\m@caption{Scene \the\m@scene. ##1}}%
  \edef\theScene{\the\m@scene}%
  \def\theF{0}\def\theFr{1}%
  \def\F##1{##1(0)}\def\Fr##1{##1(1)}%
  \scene@frame{#1}%
%
  \iflastframe@
   \def\caption##1{}%
   \gdef\m@caption{The End.}%
   \def\theF{1}\def\theFr{0}%
   \def\F##1{##1(1)}\def\Fr##1{##1(0)}%
   \scene@frame{#1}%
  \fi
  }\ignorespaces}

\def\scene@frame#1{\vbox{\null
  \dimen@=\m@width \advance\dimen@2\xydashw@
  \hrule width\dimen@
  \hbox to\dimen@{\vrule width\xydashw@ \hss
   \vbox to\m@height{\hsize=\m@width \null\vfil{#1}\vfil\null}%
   \hss \vrule width\xydashw@}%
  \hrule width\dimen@
  \setbox0=\hbox{%
   \setbox0=\hbox to\m@width{\hss\strut \m@caption\hss}%
   \dimen0=\dp0 \ht0=0pt \dp0=0pt \raise\dimen0\box0}%
  \ht0=0pt \dp0=0pt \box0\relax
  \null}}
\DOCMODE)

\paragraph*{The end \& Log}\leavevmode

\DOCMODE(
\xyendinput

% $Log: xymovie.doc,v $
% Revision 3.5  1997/05/28 13:05:01  krisrose
% Fixed missing breaks bug.
%
% Revision 3.4  1997/05/18 02:37:17  krisrose
% Fits movie.cls 3.4...still experimental.
%
% Revision 1.1  1997/05/18 01:22:10  krisrose
% Initial revision
%
% NEW for version 3.4.
\DOCMODE)

\DOCMODE3%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Tell Emacs how we are formatted:
% Local Variables:
% mode:latex
% fill-prefix:"\t"
% fill-column:77
% paragraph-separate:"^[ \t\f]*$\\|^[^\t]\\|\\\\\\\\\\|\\$\\$\\|[^\n\\\\][%&]"
% paragraph-start:"^[ \t\f]*$\\|^[^\t]\\|\\\\\\\\\\|\\$\\$\\|[^\n\\\\][%&]"
% TeX-parse-self:nil
% LaTeX-indent-level:1
% TeX-brace-indent-level:1
% End: