summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/screenplay/screenplay.cls
blob: b59362ddbdeb6e68ffde0e4ac82760d980e29363 (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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
% $Header: /home/johnny/html/Sacrifice/LaTeX/RCS/screenplay.cls,v 1.417 2006/09/16 20:56:57 johnny Exp $
% Provides markup mostly along the lines of
% 	http://www.oscars.org/nicholl/format.html
%
% Authored by and Copyright (C) 2006 by 
% 	John Pate <johnny@dvc.org.uk>
% 		http://dvc.org.uk
%
% See http://dvc.org.uk/sacrific.txt/example.tex
%
% See specs, licence, at end.
% ``It works for me.''
% I'm no kind of TeXpert! YOUR MILEAGE MAY VARY

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{screenplay}


% article class seems to work ...
%
\DeclareOption*{
	\PassOptionsToClass{\CurrentOption}{article}
	}
\ProcessOptions


% MUST be 12pt, MUST be American letter paper NOT A4 ...
%
\LoadClass[12pt,letterpaper]{article}
%
% geometry package makes dvips/pdf do the right thing ...
%
\usepackage[dvips,letterpaper]{geometry}
%
% and make sure your printer driver knows letter
% yes, you NEED American 8.5"x11" letter paper not A4
% stationers in the UK call it `quarto' paper
% see http://www.gwydir.demon.co.uk/jo/units/print.htm


% MUST have Courier as font (may cause warnings about font stuff, ignore) ...
%
\usepackage{courier}
\renewcommand*\familydefault{\ttdefault}


% needed for testing for optional args ...
%
\RequirePackage{ifthen}


% can load hyphenation ability for non-standard font ... 
%\usepackage[htt]{hyphenat}
% (comment out raggedright here and in dialogue & titleover envs) 
% you really DO NOT want hyphenation
% you want this ...
%
\raggedright
%
% between this and the typewriter font we're likely to
% have to live with a few `Overfull \hbox' warnings


% page numbers top right ...
%
\def\ps@myheadings{%
    \let\@oddfoot\@empty\let\@evenfoot\@empty
    \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
    }
\pagestyle{myheadings}


% margins and such
% fiddle if you must, see specs at end ... 
%
% left margin, default 1in + ...
\setlength{\evensidemargin}{0.5in}
\setlength{\oddsidemargin}{0.5in}
%
% top margin ...
\setlength{\topmargin}{-0.7in}
\setlength{\headsep}{0.2in}
\setlength{\topskip}{0in}
%
% reckon this gives a reasonable bottom margin ...
\setlength{\textheight}{9.7in}
%
% 6in for 1in right margin ...
\setlength{\textwidth}{6.0in}
%
% tabbing / spacing for dialogues 
\newcommand{\dialwidth}{3.2in}
\newcommand{\dialtab}{\hspace{1.5in}}
\newcommand{\dialnametab}{\hspace*{1.2in}}
\newcommand{\parenwidth}{2.1in}
\newcommand{\parentab}{\hspace{0.7in}}


% skip one line between paras ...
%
\setlength{\parskip}{1.0em plus0.1em minus0.1em}
%
% no paragraph indent ...
%
\setlength{\parindent}{0in}


% for title page - author details ... 
%
% use one of \titleauthor, \nicholl, \titleextra to taste ...
% this has to be the first command after \begin{document}
% (if you shrink \textwidth you will need to adjust \hspace here)
%

% \titleauthor[year]{title}{author's name}{contact details\\email etc}
%  -- don't fuss about warnings if it looks OK
% (the copyright notice doesn't fit the spec so optional... if you
% put it on the web tho, copyright certainly won't hurt!)
%
\newcommand{\titleauthor}[4][]{
	\thispagestyle{empty}
	\parbox{1em}{ \ }
	\vspace{2.2in}
	\begin{center}{\textbf{\MakeUppercase{#2}}\\}
		\vspace{1em}by\\\vspace{1em}#3
	\ifthenelse{\not\equal{#1}{}}
	{
	\\\vspace{1em}\scriptsize\copyright\normalsize#1\\
	}{}
	\end{center}
	\vspace{4.25in}
	\hspace{4.0in}\parbox{2.0in}{#4} 
% reset page numbers for actual blurb ...
	\newpage\setcounter{page}{1}
} %titleauthor

% \nicholl{title of your magnum opus}
% for Nicholl Competition -- just the title, not bolded ...
%
\newcommand{\nicholl}[1]{
	\thispagestyle{empty}
	\parbox{1em}{ \ }
	\vspace{2.2in}
	\begin{center}\MakeUppercase{#1}\end{center}
% reset page numbers for actual blurb ...
	\newpage\setcounter{page}{1}
} %nicholl

% \titleextra{extra blurb}{title}{author's name}{contact details\\email etc}
% for title page - author details with extra blurb
% not recommended by the Academy but by popular request, apparently
%  -- don't fuss about warnings if it looks OK
%
\newcommand{\titleextra}[4]{
	\thispagestyle{empty}
	\parbox{1em}{ \ }
	\vspace{2.2in}
	\begin{center}{\textbf{\MakeUppercase{#2}}\\}
		\vspace{1em}by\\\vspace{1em}#3
	\end{center}
	\vspace{4.25in}
	\parbox[t]{2.0in}{#1}\hspace*{2.0in}\parbox[t]{2.0in}{#4} 
% reset page numbers for actual blurb ...
	\newpage\setcounter{page}{1}
} %titleextra

%
% end title page - author details 


% \paren{hello world}
% parenthetical within dialogue env stage dirs ...
% only for _very short_ text (directions) within dialogue env
%
\newcommand{\paren}[1]{%
\\\parentab\parbox{\parenwidth}{(#1)}\\
} %paren


% dialogue environment ...
%
% \begin{dialogue}[directions]{character name} ...  \end{dialogue}
% \begin{dialogue}{character name} ...  \end{dialogue}
%
% also uses above parenthetical logic but without the newlines
% minipage won't allow pagebreaks, see below for new manual
% pagebreak command for this env
% (you can centre the NAME but tabbing is more typewriter-esque)
%
\newenvironment{dialogue}[2][]{

\dialtab\begin{minipage}{\dialwidth}
\raggedright
\dialnametab\hbox{\MakeUppercase{#2}}\\
%\centerline{\MakeUppercase{#2}}
\ifthenelse{\not\equal{#1}{}}
{
\parentab\parbox{\parenwidth}{(#1)}\\
}{}
}{ \end{minipage}

}% end dialogue

% Forcing pagebreak in dialogue,
%
% \dailbreak{Character}
% \dailbreak[directions]{Character}
%
% (need to know character name -- LaTeX scoping rules don't seem to
% like global vars, somebody tell me howto fix it)
% NOTE:
% only do any manual pagebreaks when you absolutely positively
% have killed every muthafucka in the room! ...
%
\newcommand{\dialbreak}[2][]{
\\\dialnametab\hbox{(MORE)}%
%\centerline{(MORE)}%
\end{dialogue}
\pagebreak
\ifthenelse{\not\equal{#1}{}}
{
\begin{dialogue}[#1]{\MakeUppercase{#2} (CONT'D)}
}{
\begin{dialogue}{\MakeUppercase{#2} (CONT'D)}
}%ifthenelse
}


% INT and EXT sluglines with [optional] arg for night/day ...
%
% \intslug[time of day]{description text}
% \intslug{description text}
%
\newcommand{\intslug}[2][]{

\MakeUppercase{INT. #2}
\ifthenelse{\not\equal{#1}{}}
                {%
\hspace{1em}\MakeUppercase{#1}
                }{}

}% intslug
 
% \extslug[time of day]{description text}
% \extslug{description text}
%
\newcommand{\extslug}[2][]{

\MakeUppercase{EXT. #2}
\ifthenelse{\not\equal{#1}{}}
                {%
\hspace{1em}\MakeUppercase{#1}
                }{}

}% extslug
 
% Apparently people do this ...
% \intextslug[time of day]{description text}
% \intextslug{description text}
%
\newcommand{\intextslug}[2][]{

\MakeUppercase{INT./EXT. #2}
\ifthenelse{\not\equal{#1}{}}
                {%
\hspace{1em}\MakeUppercase{#1}
                }{}

}% intextslug

% and/or this ... 
% \extintslug[time of day]{description text}
% \extintextslug{description text}
%
\newcommand{\extintslug}[2][]{

\MakeUppercase{EXT./INT. #2}
\ifthenelse{\not\equal{#1}{}}
                {%
\hspace{1em}\MakeUppercase{#1}
                }{}

}% extintslug

% Title over ...
%
% \begin{titleover} ... \end{titleover}
% as pseudo dialogue env (think ``Star Wars'')
%
\newenvironment{titleover}[1][]{

\ifthenelse{\not\equal{#1}{}}
{%true
TITLE OVER (#1):\\
}{%false
TITLE OVER:\\
}%ifthenelse
\vspace{1em}
\dialtab\begin{minipage}{\dialwidth}
\raggedright
}{

\end{minipage}

}

% pagebreak for titleover environment ...
% 
\newcommand{\titbreak}{
\\\dialnametab\hbox{(MORE)}%
%\centerline{(MORE)}%
\end{titleover}
\pagebreak
\begin{titleover}[CONT'D]
}


% title over for short text, most often a date
% \centretitle{short text}
%
\newcommand{\centretitle}[1]{

TITLE OVER:

\vspace{1.0em}
\centerline{#1}

} %titleover


% \fadein
%
\newcommand{\fadein}{


FADE IN:


} %fadein


% \fadeout
%
\newcommand{\fadeout}{

\vspace{-1.0em}
\begin{flushright}FADE OUT:\end{flushright}
\vspace{-1.0em}

} %fadeout


% \intercut
%
\newcommand{\intercut}{

\vspace{-1.0em}
\begin{flushright}INTERCUT WITH:\end{flushright}
\vspace{-1.0em}

} %intercut


% IMHO this stuff is useful for description ...
%
\newcommand{\pov}{P.O.V. }
\newcommand{\nb}{NOTE: }

% yeah!
\newcommand{\theend}{
\begin{center}THE END\end{center}
}


% specs from the Academy ...
% http://www.oscars.org/nicholl/format.html
%
% Letter paper 8.5"x11.0"
% Courier 12pt
% 
% PAGE
% Top margin:	0.75"
% Bottom margin:0.5"
% Left margin:	1.5"
% Right margin:	1.0"
% 
% DIALOGUE
% centre NAME over dialogue
%     or tab to 4.2"
% Left margin:	3.0"
% Right margin:	2.3"
% 	Parenthetical
% Left margin:	3.7"
% Right margin:	3.0"
% 
% Numbering: Top Right, Arabic
% Top margin:	0.5"
% Right margin:	0.75"
% 
% INT/EXT. SLUG LINE DESCRIPTION   DAY/NIGHT
%                               ^^^ some kind of extra spacing 
%
% $Id: screenplay.cls,v 1.417 2006/09/16 20:56:57 johnny Exp $
% +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
%
% Latest version is available as:
%	http://dvc.org.uk/sacrific.txt/screenplay.cls
%
% Copyright (C) 2006 John Pate <johnny@dvc.org.uk>
%
% 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.
% 
% You should have received a copy of the GNU General Public License along
% with this program; if not, write to the Free Software Foundation, Inc.,
% 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
% 
% GPL v2 text also available as: 
% 	http://dvc.org.uk/gplv2.txt 
% 
% +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=