]> git.lyx.org Git - lyx.git/blob - lib/tex/hollywood.cls
two patches from John, and a moving math panel
[lyx.git] / lib / tex / hollywood.cls
1 %% Author: Garst R. Reese  reese@isn.net
2 %% This is file `hollywood.cls', which provides the current
3 %% preferred format for submission of "spec" scripts
4 %% It is a pretty dull and uninteresting format, but it sells
5 %% Derived from report.cls. There is probably still a lot of stuff
6 %% that could be deleted. 
7 \NeedsTeXFormat{LaTeX2e}
8 \ProvidesClass{hollywood} [2001/9/10 v1.2 uses hollywood.layout]
9 \usepackage{fancyhdr}
10 \usepackage{extramarks}
11 \usepackage{ifthen}
12 \usepackage{lastpage}
13 %%\usepackage{geometry}
14 \usepackage{calc}
15 %%\usepackage{setspace}
16 \renewcommand{\ref}[1]{#1}
17 \newcommand\@ptsize{}
18 \newif\if@restonecol
19 \newif\if@titlepage
20 \@titlepagetrue
21 \newif\if@openright
22 \DeclareOption{letterpaper}
23    {\setlength\paperheight {11in}%
24     \setlength\paperwidth  {8.5in}%
25 }
26 \DeclareFontFamily{OT1}{pcr}{\hyphenchar\font=-1}
27 \DeclareFontShape{OT1}{pcr}{m}{n}{<12>  pcrr7t}{}
28 \DeclareFontFamily{T1}{pcr}{\hyphenchar\font=-1}
29 \DeclareFontShape{T1}{pcr}{m}{n}{<12> pcrr8t}{}
30 \DeclareOption{12pt}{\renewcommand\@ptsize{0}}
31 \DeclareOption{12pt}{\renewcommand\@ptsize{1}}
32 \DeclareOption{12pt}{\renewcommand\@ptsize{2}}
33 \DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
34 \DeclareOption{twoside}{\@twosidetrue  \@mparswitchtrue}
35 \DeclareOption{draft}{\setlength\overfullrule{5pt}}
36 \DeclareOption{final}{\setlength\overfullrule{0pt}}
37 \DeclareOption{titlepage}{\@titlepagetrue}
38 \DeclareOption{notitlepage}{\@titlepagefalse}
39 \DeclareOption{openright}{\@openrighttrue}
40 \DeclareOption{openany}{\@openrightfalse}
41 \DeclareOption{onecolumn}{\@twocolumnfalse}
42 \ExecuteOptions{letterpaper,12pt,oneside,onecolumn,final,openany}
43 \ProcessOptions
44 \input{size1\@ptsize.clo}
45 \setlength\lineskip{1\p@}
46 \setlength\normallineskip{1\p@}
47 \renewcommand\baselinestretch{}
48 \setlength\parskip{0\p@ \@plus \p@}
49 \@lowpenalty   51
50 \@medpenalty  151
51 \@highpenalty 301
52 \setcounter{topnumber}{2}
53 \renewcommand{\headrulewidth}{0pt}
54 \renewcommand\topfraction{.7}
55 \setcounter{bottomnumber}{1}
56 \renewcommand\bottomfraction{.3}
57 \setcounter{totalnumber}{3}
58 \renewcommand\textfraction{.2}
59 \renewcommand\floatpagefraction{.5}
60 \setcounter{dbltopnumber}{2}
61 \renewcommand\dbltopfraction{.7}
62 \renewcommand\dblfloatpagefraction{.5}
63   \def\ps@headings{%
64     \let\@oddfoot\@empty
65     \def\@oddhead{{\slshape\rightmark}\hfil\thepage.}%
66     \let\@mkboth\markboth
67 }
68 \def\ps@myheadings{%
69     \let\@oddfoot\@empty\let\@evenfoot\@empty
70     \def\@evenhead{\thepage.\hfil\slshape\leftmark}%
71     \def\@oddhead{{\slshape\rightmark}\hfil\thepage.}%
72     \let\@mkboth\@gobbletwo
73     }
74   \if@titlepage
75 \newcommand{\address}{\renewcommand{\@address}}
76 \newcommand{\@address}{}
77   \newcommand\maketitle{\begin{titlepage}%
78   \let\footnotesize\small
79   \let\footnoterule\relax
80   \let \footnote \thanks
81   \null\vfil
82   \vskip 60\p@
83   \begin{center}%
84 %%    { \underline{\@title} \par}%
85     { \@title \par}%
86     \vskip 3em%
87     {\lineskip .75em%
88       \begin{tabular}[t]{c}%
89         \@author
90       \end{tabular}\par}%
91       \vskip 1.5em%
92   \end{center}\par
93 \raggedleft
94 \vfill
95 \begin{tabular}{l}%
96 \ignorespaces
97 \@address
98 \end{tabular}\par%
99   \@thanks
100 %  \vfil\null
101   \end{titlepage}%
102   \setcounter{footnote}{0}%
103   \global\let\thanks\relax
104   \global\let\maketitle\relax
105 % \global\let\@address\@empty
106   \global\let\@thanks\@empty
107   \global\let\@author\@empty
108   \global\let\@date\@empty
109   \global\let\@title\@empty
110 % \global\let\address\relax
111   \global\let\title\relax
112   \global\let\author\relax
113   \global\let\date\relax
114   \global\let\and\relax
115 }
116 \fi
117   \setlength\leftmargini  {2.5em}
118 \leftmargin  \leftmargini
119 \setlength  \labelsep  {.5em}
120 \setlength  \labelwidth{\leftmargini}
121 \addtolength\labelwidth{-\labelsep}
122 \@beginparpenalty -\@lowpenalty
123 \@endparpenalty   -\@lowpenalty
124 \@itempenalty     -\@lowpenalty
125 \renewcommand\theenumi{\@arabic\c@enumi}
126 \newcommand\labelenumi{\theenumi.}
127 \renewcommand\p@enumii{\theenumi}
128 \newcommand\labelitemi{\textbullet}
129 \newenvironment{titlepage}
130     {%
131       \if@twocolumn
132         \@restonecoltrue\onecolumn
133       \else
134         \@restonecolfalse\newpage
135       \fi
136       \thispagestyle{empty}%
137       \setcounter{page}\@ne
138       \addtocounter{page}{1}
139     }%
140     {\if@restonecol\twocolumn \else \newpage \fi
141      \if@twoside\else
142         \setcounter{page}\@ne
143       \addtocounter{page}{1}
144      \fi
145     }
146 \setlength\tabbingsep{\labelsep}
147 \skip\@mpfootins = \skip\footins
148 \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
149 \DeclareOldFontCommand{\sl}{\normalfont\ttfamily}{\mathtt}
150 \newcommand\@pnumwidth{1.55em}
151 \newcommand\@tocrmarg{2.55em}
152 \newcommand\@dotsep{4.5}
153 \setcounter{tocdepth}{2}
154 \setlength\columnsep{10\p@}
155 \setlength\columnseprule{0\p@}
156 \pagestyle{plain}
157 \pagenumbering{arabic}
158   \raggedbottom
159   \onecolumn
160 \rfoot{\pageref{LastPage}[]{}}
161
162 % This is what we want for a spec script
163 %% set l & rt margin
164  \setlength{\rightmargin}{.75in}
165    \setlength{\leftmargin}{1.5in}%
166    \setlength{\textwidth}%
167      {\paperwidth -\leftmargin -\rightmargin}%
168 %% Set vertical spacing
169    \setlength\topmargin {48bp}%
170    \setlength\headheight {12bp}%
171    \setlength\headsep {24bp}%
172    \setlength\footskip {0bp}% there are no footnotes
173 %% set page length
174 \newlength{\bmargin}%
175 \setlength{\bmargin}{.75in}%
176 \setlength{\textheight}%
177 {\paperheight -\bmargin -\topmargin -\headheight -\headsep }% 
178
179
180 \pagestyle{fancy}
181 \rhead{\thepage.}
182 \cfoot{}
183   % This one is needed to get real adobe courier, but you can use
184   % cmtt which is also correct
185   \renewcommand{\familydefault}{pcr}
186   % This is to negate the effect of the ~ that LyX adds everywhere
187  \let~=\space
188   % this protects you against the fact that TeX does not want to
189   % hyphenate in typewriter font. It is possible to enable
190   % hyphenation, but I do not remember how.
191   % That's good because we -do not- want any hyphenation.
192   \sloppy
193 \newlength{\lnspace}
194 \setlength{\lnspace}{6bp plus 3bp minus 3bp}
195
196 \newcommand{\fadein}[1]{\filbreak\raggedright\par FADE IN:
197 \uppercase{#1}\par\vspace{2bp}}%
198 \newcommand{\fadeout}{\filbreak\raggedright\par FADE OUT }%
199 \newcommand{\intercut}{\filbreak\par INTERCUT WITH: }%
200 \newcommand{\interiorshot}[1]%
201 {\filbreak
202 \vspace{\lnspace}
203 \raggedright
204 \par INT. 
205 \uppercase{#1}
206 }%
207
208 \newcommand{\exteriorshot}[1]%
209 {\filbreak
210 \vspace{\lnspace}
211 \raggedright
212 \par EXT. 
213 \uppercase{#1}
214 \vspace{\lnspace}
215 }%
216 %% Generalized Scene command in case INT. EXT. etc is not sufficient.
217 \newcommand{\scene}[1]%
218 {\filbreak
219 \vspace{4bp}
220 \raggedright
221 \par 
222 \uppercase{#1}
223 }%
224 \newlength{\dialogLength}
225 \setlength{\dialogLength}{4in minus 1in}
226 \newlength{\parenLength}
227 \setlength{\parenLength}{2.2in plus .5in minus .7in}
228 \newlength{\dialogindent}
229 \setlength{\dialogindent}{1in plus .5in}
230
231 \newcommand{\dialogue}[1]%
232 {\raggedright
233 \hspace{\dialogindent}
234 \parbox{\dialogLength}{#1}
235 \vspace{4bp}
236 }
237
238 \newcommand{\narrative}[1]%
239 {\filbreak
240 \vspace{4bp}
241 \raggedright{#1}
242 \vspace{4bp}
243 }
244 \newcommand{\description}[1]%
245 {
246 \rfoot[]{}
247 \lhead[]{}
248 \vspace{\lnspace}
249 \raggedright{#1}
250 \vspace{\lnspace}
251 }
252
253 \newsavebox{\currentspeaker}
254 \newlength{\speakeroffset}
255 \setlength{\speakeroffset}{1in plus .25in}
256 \newlength{\speakerindent}
257 \setlength{\speakerindent}{\dialogindent +\speakeroffset}
258
259 \newcommand{\speaker}[1]%
260 {\filbreak
261 \vspace{4bp}
262 \hspace{\speakerindent}
263 \sbox{\currentspeaker}{\uppercase{#1}}
264 \usebox{\currentspeaker}
265 \vspace{4bp}
266 }
267
268 \newcommand{\contd}%
269 {\filbreak
270 \vspace{4bp}
271 \hspace{\speakerindent}\usebox{\currentspeaker} (CONT'D)
272 \vspace{4bp}
273 }
274
275 \newcommand{\more}%
276 {
277 \vspace{0bp}
278 \hspace{\speakerindent}\uppercase{(MORE)}
279 \pagebreak\contd%
280 }
281
282 \newlength{\parenindent}
283 \newlength{\parenoffset}
284 \setlength{\parenoffset}{.5in}
285 \setlength{\parenindent}{\speakerindent -\parenoffset}
286
287 \newcommand{\parenthetical}[1]%
288 {
289 \hspace{\parenindent}
290 \vspace{-2bp}
291 \parbox{\parenLength}{(#1)}
292 \vspace{4bp}}
293
294 \newcommand{\titleover}[1]%
295 {\filbreak
296 \par TITLE OVER:
297 \par\hspace{\parenindent}{#1}\par\raggedright}
298
299 \newcommand{\continuing}[0]%
300 {\filbreak
301 \vspace{4bp}
302 \hspace{\speakerindent}
303 \usebox{\currentspeaker}{ (continuing})\par
304 \vspace{2bp}
305 }
306
307
308 \endinput
309 %%
310 %% End of file `hollywood.cls'
311 ~