summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/screenplay/screenplay.cls
blob: cfb30df3f5e99a838c78195a873181b750c45550 (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
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
% $Header: /home/johnny/html/Sacrifice/LaTeX/RCS/screenplay.cls,v 1.451 2006/09/23 08:39:25 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 specs, licence, at end.
% ``It works for me.''
% I'm no kind of TeXpert! YOUR MILEAGE MAY VARY
%
% Tested with ...
%	pdfeTeX 3.141592-1.21a-2.2 (Web2C 7.5.4)
%	dvips(k) 5.95a
%	kpathsea version 3.5.4
%	article 2004/02/16 v1.4f


% Version used in testing ...
\NeedsTeXFormat{LaTeX2e}[2003/12/01]

\ProvidesClass{screenplay}[2006/09/23 v1.451 LaTeX2e Draft Screenplay document class
				(C)2006 John Pate
				released under GNU General Public License.]

% Some initialization...

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


% 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}


% Can load hyphenation ability for non-standard font ... 
%\usepackage[htt]{hyphenat}
% but DON'T, you should NOT hyphenate for Nicholl format
% you want this ...
%
\raggedright
%
% You'll have to nuke \raggedright wherever found to test out
% hyphenation
%
% You will likely have to add a few \\ to some of the dialogue
% text blocks (and even maybe in the scene descriptions)
% to help \TeX\ out with linebreaks, or you'll get extra space
% where you don't want it (sometimes even where `Overfull \hbox'
% warnings are absent).
%
% LaTeX isn't really meant for fixed pitch but we're
% pretending to be a typewriter here.

% end intialization


% Page Numbers top right ...
\pagestyle{myheadings}


% Line spacing / Pitch / parindent
%
% fixed pitch, 10pt ...
\setlength{\baselineskip}{10pt plus 0pt minus 0pt}
% AFAICS floats not involved ...
\renewcommand*{\textfraction}{1}
\renewcommand*{\topfraction}{0}
\renewcommand*{\bottomfraction}{0}
%\setlength{\floatsep}{\baselineskip}
%\setlength{\textfloatsep}{\floatsep}
%\setlength{\intextsep}{\floatsep}
%
% skip one line between paras ...
\setlength{\parskip}{\baselineskip}
% no paragraph indent ...
\setlength{\parindent}{0in}


% Margins and such, see specs at end 
% fudge factors needed to resemble the `correct'
% layout - take a ruler to it and `script.pdf' ...
%
% left margin 1.5", default 1" + ...
\setlength{\evensidemargin}{0.5in}
\setlength{\oddsidemargin}{0.5in}
%
% top margin (0.5" to number, 1" to body) ...
\setlength{\topmargin}{-0.5in}
\setlength{\headsep}{0.4in}
\setlength{\topskip}{0in}
%
% 11" - (1" top margin) - (0.5" bottom) = 
\setlength{\textheight}{9.5in}
% bottom can go to 1.5" for page breaking purposes
%
% 6" for 1" right margin ...
\setlength{\textwidth}{6.1in}		% 0.1" fudge 
%
% extra inter-word spacing in sluglines ...
\newcommand{\slugspace}{\hspace{2.0em plus 0em minus 0em}}
%\newcommand{\slugspace}{ - }
%\newcommand{\slugspace}{\quad}
%
% tabbing / spacing for dialogues ...
\newcommand{\dialwidth}{3.2in}		% 3" wide with 0.2" fudge
\newcommand{\dialtab}{\hspace*{1.5in}}	% 3" from left edge
\newcommand{\dialnametab}{\hspace*{1.2in}}	% NAME, tab in 4.2" from left
\newcommand{\parenwidth}{1.7in}		%parenthetical 1.5" with 0.2" fudge
\newcommand{\parentab}{\hspace{0.7in}}	% paren, tab in 3.7" from left
%
\newcommand{\dialfix}{\vspace{5pt}}	% adjust space above dialogue
%
% fix for formatting of multi-line parenthetical ...
\newcommand{\parenkludge}{\dialfix}
% ... more missing space to put back
% (I really should look at the TeX source sometime.)


% Title Page - Author details ... 
%
% use one of \titleauthor, \nicholl, \titleextra to taste ...
% this must be the first command after \begin{document}
%
% you may have to adjust the \titlesepspace if you put in a lot of text
%
\newcommand{\titlesepspace}{\vspace{3.75in plus 0in minus 1.0in}}
% there's also a the space occupied by the optional copyright year
\newcommand{\copyspace}{\vspace*{2ex plus 0ex minus 0ex}}
%

% \titleauthor[year]{title}{author's name}{contact details\\email etc}
% [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} % no page number
	\vspace*{2.25in}
	\begin{center}{\textbf{\MakeUppercase{#2}}}\\
		\vspace{\baselineskip}
		by\\
		\vspace{\baselineskip}
		#3\\
		\vspace*{\baselineskip}
	\ifthenelse{\not\equal{#1}{}}
	{
		\scriptsize\copyright\normalsize#1
	}{
		\copyspace
	}
	\end{center}
	\titlesepspace
	\hspace*{4.0in}\parbox[t]{2.0in}{\raggedright#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}
	\vspace*{2.25in}
	\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
% some people like to put in copyright and WGA registration details
%
\newcommand{\titleextra}[4]{
	\thispagestyle{empty}
	\vspace*{2.25in}
	\begin{center}{\textbf{\MakeUppercase{#2}}}\\
		\vspace{\baselineskip}
		by\\
		\vspace{\baselineskip}
		#3\\
		\vspace*{\baselineskip}
		\copyspace
	\end{center}
	\titlesepspace
	\parbox[t]{2.0in}{\raggedright#1}\hspace*{2.0in}\parbox[t]{2.0in}{\raggedright#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
% the [optional arg] is for internal use only
%
\newcommand{\paren}[2][\\]{%
#1\parentab\parbox[t]{\parenwidth}{\raggedright(#2)\parenkludge}\\
} %paren


% dialogue environment ...
%
% \begin{dialogue}[directions]{character name} ...  \end{dialogue}
% \begin{dialogue}{character name} ...  \end{dialogue}
%
% minipage won't allow pagebreaks, see below for new manual
% pagebreak command for this env.
% NAME is outside \minipage to mitigate `Overfull \hbox' 
% warnings with long names
%
\newenvironment{dialogue}[2][]{

\dialtab\dialnametab\hbox{\MakeUppercase{#2}}\nopagebreak\\
\dialtab\begin{minipage}[b]{\dialwidth}
\dialfix
\raggedright
\ifthenelse{\not\equal{#1}{}}
{
\paren[]{#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 otherwise)
% NOTE:
% only do any manual pagebreaks when you absolutely positively
% have killed every muthafucka in the room! ...
%
\newcommand{\dialbreak}[2][]{
\\\dialnametab\hbox{(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}{}}
                {%
\slugspace\MakeUppercase{#1}\hspace{\fill}
                }{}
\nopagebreak 


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

\MakeUppercase{EXT. #2}%
\ifthenelse{\not\equal{#1}{}}
                {%
\slugspace\MakeUppercase{#1}\hspace{\fill}
                }{}
\nopagebreak


}% 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}{}}
                {%
\slugspace\MakeUppercase{#1}\hspace{\fill}
                }{}
\nopagebreak


}% intextslug

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

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


}% 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{\baselineskip}
\nopagebreak
\dialtab\begin{minipage}[b]{\dialwidth}
\raggedright
}{

\end{minipage}

}

% pagebreak for titleover environment ...
% 
\newcommand{\titbreak}{
\\\dialnametab\hbox{(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:
\nopagebreak

\hspace*{\fill}{#1}\hspace{\fill}


} %titleover


% \fadein
%
\newcommand{\fadein}{


FADE IN:


} %fadein


% \fadeout
%
\newcommand{\fadeout}{


\hspace*{\fill}FADE OUT:


} %fadeout


% \intercut
%
\newcommand{\intercut}{


\hspace*{\fill}INTERCUT WITH:


} %intercut


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

% yeah!
\newcommand{\theend}{


\hspace*{\fill}THE END\hspace{\fill}


} %THE END


% specs from the Academy ...
% http://www.oscars.org/nicholl/format.html
%
% Letter paper 8.5"x11.0"
% Courier 12pt, 10 pitch
% 
% PAGE
% Top margin:	1.0"
% Bottom margin:0.5"-1.5"
% Left margin:	1.5"
% Right margin:	1.0"
% 
% DIALOGUE
% tab NAME to:	4.2"
% Left margin:	3.0"
% Right margin:	2.5"
%   Parenthetical
% Left margin:	3.7"
% Right margin:	3.3"
% 
% 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.451 2006/09/23 08:39:25 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 
% 
% +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=