summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/screenplay/screenplay.cls
blob: 186a3ec309ad966e8e9f4e1483bcefee99ca448b (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
% $Header: /home/johnny/html/Sacrifice/LaTeX/RCS/screenplay.cls,v 1.440 2006/09/19 12:58:41 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

\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}
% 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
%
% between this and the `fixed pitch' typewriter font we may
% want to live with one or two `Overfull \hbox' warnings in
% final copy (a word going into the right margin).  You will
% likely have to add a few \\ to some of the dialogue text
% blocks to help TeX out with linebreaks so the formatting
% works, or you'll get extra space where you don't want it.
%
% LaTeX isn't really meant for fixed pitch but we're
% pretending to be a typewriter here.


% page numbers top right ...
\pagestyle{myheadings}


% margins and such see specs at end ... 
% -- fudge factors are apparent in `script.pdf' (use a ruler)
% they're needed to approach the `correct' margins with tt font ...
%
% 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 
%
% 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
%
% kludgy fix for formatting of parenthetical ...
\newcommand{\parenkludge}{\vspace{5pt}}
% multi-line parentheticals require this be in,  tested with
% TeX 3.141592 (Web2C 7.5.4)
% pdfeTeX 3.141592-1.21a-2.2 (Web2C 7.5.4)
% kpathsea version 3.5.4


% line spacing / pitch / parindent
%
% fixed pitch, 10pt ...
\setlength{\baselineskip}{10pt plus 0pt minus 0pt}
% LaTeX floats minipages and centring (I assume) so fix them ...
\setlength{\floatsep}{\baselineskip}
\setlength{\textfloatsep}{\baselineskip}
\setlength{\intextsep}{\baselineskip}
%
% skip one line between paras ...
\setlength{\parskip}{\baselineskip}
% no paragraph indent ...
\setlength{\parindent}{0in}


% for 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 \vspace if you put in a lot of text
%

% \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
	\ifthenelse{\not\equal{#1}{}}
	{
	\\\vspace{\baselineskip}\scriptsize\copyright\normalsize#1%
	\end{center}
	\vspace{4.0in}
	}{%
	\end{center}
	\vspace{4.2in}
	}
	\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\end{center}
	\vspace{4.2in}
	\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
%
\newcommand{\paren}[1]{%
\\\parentab\parbox[t]{\parenwidth}{\raggedright(#1)\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
% (you can centre the NAME but tabbing is more typewriter-esque)
%
\newenvironment{dialogue}[2][]{

\dialtab\begin{minipage}[b]{\dialwidth}
\raggedright
\dialnametab\hbox{\MakeUppercase{#2}}
%\centerline{\MakeUppercase{#2}}
\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)}%
%\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}{}}
                {% 1em = width of `M'
\hspace{1em}\MakeUppercase{#1}
                }{}
\nopagebreak 

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

\MakeUppercase{EXT. #2}
\ifthenelse{\not\equal{#1}{}}
                {%
\hspace{1em}\MakeUppercase{#1}
                }{}
\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}{}}
                {%
\hspace{1em}\MakeUppercase{#1}
                }{}
\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}{}}
                {%
\hspace{1em}\MakeUppercase{#1}
                }{}
\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)}%
%\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{\baselineskip}
\nopagebreak
\centerline{#1}\\

} %titleover


% \fadein
%
\newcommand{\fadein}{


FADE IN:


} %fadein


% \fadeout
%
\newcommand{\fadeout}{

\vspace{-\baselineskip}
\begin{flushright}FADE OUT:\end{flushright}
\vspace{-\baselineskip}

} %fadeout


% \intercut
%
\newcommand{\intercut}{

\vspace{-\baselineskip}
\begin{flushright}INTERCUT WITH:\end{flushright}
\vspace{-\baselineskip}

} %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, 10 pitch
% 
% PAGE
% Top margin:	1.0"
% Bottom margin:0.5"-1.5"
% Left margin:	1.5"
% Right margin:	1.0"
% 
% DIALOGUE
% centre NAME over dialogue (deprecated)
% 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.440 2006/09/19 12:58:41 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 
% 
% +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=