Debian Codegraph @

texmf-dist/source/latex/plari/plari.dtx

raw
1 % \iffalse meta-comment
2 %% plari - Typesetting stage play scripts with LaTeX2e
3 %%
4 %% Copyright (c) 1998 Antti-Juhani Kaijanaho
5 %%
6 %% This program is free software; you can redistribute it and/or modify
7 %% it under the terms of the GNU General Public License as published by
8 %% the Free Software Foundation; either version 2 of the License, or
9 %% (at your option) any later version.
10 %%
11 %% This program is distributed in the hope that it will be useful,
12 %% but WITHOUT ANY WARRANTY; without even the implied warranty of
13 %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 %% GNU General Public License for more details.
15 %%
16 %% You should have received a copy of the GNU General Public License
17 %% along with this program; see the file COPYING. If not, write to
18 %% the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 %% Boston, MA 02111-1307, USA.
20 %%
21 %% Just to be sure everybody understands this:
22 %% Including plari.cls in one's document with the LaTeX2e command
23 %% \documentclass[...]{plari}
24 %% is considered /use/ of plari.cls and is therefore not restricted
25 %% by the GNU General Public License. If you still are unsure, you
26 %% can regard this notice as a special exeption to the GNU General
27 %% Public License, to be applied to plari.cls as authored by Antti-Juhani
28 %% Kaijanaho.
29 %%
30 % \fi
31 %% \CheckSum{87}
32 %% \CharacterTable
33 %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
34 %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
35 %% Digits \0\1\2\3\4\5\6\7\8\9
36 %% Exclamation \! Double quote \" Hash (number) \#
37 %% Dollar \$ Percent \% Ampersand \&
38 %% Acute accent \' Left paren \( Right paren \)
39 %% Asterisk \* Plus \+ Comma \,
40 %% Minus \- Point \. Solidus \/
41 %% Colon \: Semicolon \; Less than \<
42 %% Equals \= Greater than \> Question mark \?
43 %% Commercial at \@ Left bracket \[ Backslash \\
44 %% Right bracket \] Circumflex \^ Underscore \_
45 %% Grave accent \` Left brace \{ Vertical bar \|
46 %% Right brace \} Tilde \~}
47 %
48 \def\filedate{1998/11/02}
49 \def\fileversion{19981102-CTAN}
50 \def\fileinfo{development snapshot}
51 %\iffalse
52 %<*driver>
53 \documentclass{ltxdoc}
54 \begin{document}
55 \DocInput{plari.dtx}
56 \end{document}
57 %</driver>
58 %\fi
59 %
60 %
61 %\title{The \texttt{plari} document class\\
62 % Typesetting stageplay scripts with \LaTeXe\thanks
63 % {This document describes \texttt{plari.dtx} version number
64 % \fileversion\ dated \filedate.}}
65 %\author{Antti-Juhani Kaijanaho}
66 %\maketitle
67 %
68 %\begin{abstract}
69 % A document class for typesetting stageplay scripts is described.
70 %\end{abstract}
71 %
72
73 %\section{Usage}
74
75 %The document class \texttt{plari} behaves like the standard document
76 %class \texttt{report} except that (a)~the sectioning commands
77 %|\section| \textit{et cetera} do not work and (b)~paragraphs are
78 %separated, not indented.
79
80 %In addition the following macros are defined: |\newact| starts a new
81 %Act, |\newscene| starts a new scene, \texttt{\bslash
82 % setting\{\meta{describe setting}\}} starts a new scene and describes
83 %the new setting, \texttt{\bslash repl\{\meta{speaker}\}} begins a new
84 %line of dialogue, spoken by \meta{speaker}, and \texttt{\bslash
85 % paren\{\meta{note}\}} typesets a parenthetical note.
86
87 %
88 %\StopEventually{\relax}
89 %
90 %\section{Implementation}
91 %
92 % First we warm up.
93 % \begin{macrocode}
94 %<*class>
95 \NeedsTeXFormat{LaTeX2e}
96 \ProvidesClass{plari}[\filedate\space\fileversion\space\fileinfo]
97 \typeout{plari <\filedate:\fileversion> - typesetting stageplay scripts}
98 % \end{macrocode}
99
100 % Currently we don't take any special arguments. We just let
101 % \texttt{report} handle them.
102 % \begin{macrocode}
103 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
104 \ProcessOptions
105 % \end{macrocode}
106
107 % We steal most of our code from \texttt{report.cls}.
108 % \begin{macrocode}
109 \LoadClass{report}
110 % \end{macrocode}
111
112 % Now we get to the point. Acts are numbered individually, scenes are
113 % numbered within acts. When referenced, act numbers are Roman, and
114 % scenes are of the form \meta{Act}:\meta{Scene}, where \meta{Scene} is
115 % the current scene in Arabic.
116 % \begin{macrocode}
117 \newcounter{act}
118 \newcounter{scene}[act]
119 \renewcommand{\theact}{\Roman{act}}
120 \renewcommand{\thescene}{\Roman{act}:\arabic{scene}}
121 % \end{macrocode}
122
123 % Acts start a new page. Their numbers are typeset bold Huge. Scenes
124 % do not start a page, and their numbers are typeset medium Large.
125 % \begin{macrocode}
126 \newcommand{\newact}{%
127 \refstepcounter{act}%
128 \newpage{\centering\bfseries\Huge--- \Roman{act} ---\par}%
129 \vspace{1.5cm plus .5cm minus .5cm}%
130 }
131 \newcommand{\newscene}{%
132 \refstepcounter{scene}%
133 \bigskip%
134 {\centering\mdseries\Large\arabic{scene}\par}%
135 \medskip%
136 }
137 % \end{macrocode}
138
139 % Most scenes come with a change of scenery. The setting is typeset
140 % with normal size italic, but with reduced canavas. Describing a
141 % setting changes scene.
142 % \begin{macrocode}
143 \newcommand{\setting}[1]{%
144 \newscene%
145 \begingroup%
146 \list{}{%
147 \listparindent=\parindent%
148 \parsep=\parskip%
149 \topsep=\z@%
150 \rightmargin=\leftmargin%
151 }%
152 \item%
153 \let\item\@undefined%
154 {\normalsize\itshape\mdseries#1\par}%
155 \endlist%
156 \endgroup%
157 }
158 % \end{macrocode}
159
160 % Every line in dialogue is preceded by a name. The name is typeset
161 % centered, in normal size medium series small caps. The next paragraph
162 % should not be indented.
163 % \begin{macrocode}
164 \newcommand{\repl}[1]{%
165 \medskip%
166 {\centering\normalsize\mdseries\scshape#1\par}%
167 % \smallskip%
168 }
169 % \end{macrocode}
170
171 % Sometimes parenthetical notes must be inserted within dialogue. These
172 % notes are typeset in italic.
173 % \begin{macrocode}
174 \newcommand{\paren}[1]{\textit{#1}}
175 % \end{macrocode}
176
177 % We do not want indents. Instead, we'll have a skip between
178 % paragraphs.
179 % \begin{macrocode}
180 \parindent=\z@
181 \parskip=\medskipamount\relax
182 % \end{macrocode}
183
184 % We don't want the user to use \LaTeX\ standard sectioning.
185 % \begin{macrocode}
186 \let\@startsection\@undefined
187 % \end{macrocode}
188
189 % We are done for good.
190 % \begin{macrocode}
191 %</class>
192 % \end{macrocode}
193
194 % \Finale