summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/stage/stage.cls83
1 files changed, 29 insertions, 54 deletions
diff --git a/Master/texmf-dist/tex/latex/stage/stage.cls b/Master/texmf-dist/tex/latex/stage/stage.cls
index d369724ccb8..4756c8c89c5 100644
--- a/Master/texmf-dist/tex/latex/stage/stage.cls
+++ b/Master/texmf-dist/tex/latex/stage/stage.cls
@@ -1,6 +1,6 @@
%% stage.cls
%% Copyright 2005 Robert Jahrling
-%% Copyright 2017 Reuben Thomas
+%% Copyright 2017–2018 Reuben Thomas
%
% This is a LaTeX2e class called stage, providing a class
% for stage play Manuscript Format.
@@ -23,7 +23,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{stage}[2017/04/25 v1.00 Manuscript Format for stage plays]
+\ProvidesClass{stage}[2018/05/14 v1.01 Manuscript Format for stage plays]
% The class is based on the default book class
\LoadClass[12pt,oneside]{book}
\PassOptionsToClass{\CurrentOption}{book}
@@ -32,6 +32,7 @@
\RequirePackage{fancyhdr}
\RequirePackage{extramarks}
\RequirePackage{needspace}
+\RequirePackage{changepage}
% These three commands are required.
% The default font size is 12/14. It looks better than 12 solid.
% The textwidth and textheight represent one-inch margins all
@@ -71,13 +72,8 @@
\renewcommand{\headheight}{14pt}
%%%
-% No indentation. Double space between paragraphs.
-\parindent 0pt
-\parskip 0pt
-\newlength{\doublespacelength}
-\setlength{\doublespacelength}{1.6ex}
-% \doublespace leaves a line's worth of space between elements.
-\newcommand{\doublespace}{\vspace{\doublespacelength}}
+% No indentation; space between paragraphs.
+\usepackage{parskip}
% \introduce is used the first time we meet a character.
\newcommand{\introduce}[1]{\textsc{#1}}
% \address is used for the writer's address
@@ -89,28 +85,15 @@
% Counts scenes per act
\newcounter{scenecounter}[actcounter]
-% An environment for specifying margin changes
-\newenvironment{changemargin}[2]{%
- \begin{list}{}{%
- % Without the following critical setting, we could use
- % changepage’s adjustwidth environment
- \setlength{\partopsep}{0pt}%
- \setlength{\topsep}{0pt}%
- \setlength{\leftmargin}{#1}%
- \setlength{\rightmargin}{#2}%
- \setlength{\listparindent}{\parindent}%
- \setlength{\itemindent}{\parindent}%
- \setlength{\parsep}{\parskip}%
- }%
- \item[]}{\end{list}}
% \dialog sets the character's name above their speech
+\let\stageoldep=\everypar
+\newlength{\saveparskip}
\newcommand{\dialog}[2]{%
- \doublespace%
\needspace{2\baselineskip}%
- \begin{changemargin}{2.5in}{0in}\textsc{#1}\end{changemargin}%
+ {\begin{adjustwidth}{2.5in}{0in}\textsc{#1}\end{adjustwidth}\saveparskip=\parskip\parskip=0pt%
\extramarks{}{}%
- #2%
- \extramarks{\textsc{#1} (\continuedname)}{}
+ {\begin{adjustwidth}{0in}{0in}\def\everypar{\parskip=\saveparskip\stageoldep}#2\end{adjustwidth}}%
+ \extramarks{\textsc{#1} (\continuedname)}{}}
}
% \dialogue, for people who like that spelling better
@@ -121,40 +104,33 @@
% Start a new page for each Act except the first
\newcommand{\act}{%
\renewcommand{\thepage}{\Roman{actcounter}-\arabic{page}}%
- \begin{changemargin}{2.5in}{0in}
- \ifthenelse{\value{actcounter} > 1}{\newpage}{}
- \ifthenelse{\value{actcounter} = 1}{\doublespace}{}
- \stepcounter{actcounter}
- \textsc{\actname} \Roman{actcounter}
- \end{changemargin}
- \setcounter{page}{1}
+ \ifthenelse{\value{actcounter} > 1}{\newpage}{\vspace{\parskip}}
+ \stepcounter{actcounter}
+ \hspace*{2.5in}\textsc{\actname} \Roman{actcounter}%
+ \setcounter{page}{1}
}
% \scene creates a scene header, with arabic numerals
%
% Start a new page for each scene except the first
\newcommand{\scene}{%
- \begin{changemargin}{2.5in}{0in}
- \stepcounter{scenecounter}
- \ifthenelse{\value{scenecounter} > 1}{\newpage}{}
- \textsc{\scenename} \arabic{scenecounter}
- \ifthenelse{\value{scenecounter} = 1}{\doublespace}{}
- \end{changemargin}
+ \extramarks{}{}%
+ \stepcounter{scenecounter}
+ \ifthenelse{\value{scenecounter} > 1}{\newpage}{\vspace{\parskip}}
+ \hspace*{2.5in}\textsc{\scenename} \arabic{scenecounter}%
}
% \stage sets the stage directions farther in than the box
% containing the dialog, and parenthesizes them.
\newcommand{\stage}[1]{%
- \doublespace
- \begin{changemargin}{2in}{0in}
+ \begin{adjustwidth}{2in}{0in}
(#1)%
- \end{changemargin}
+ \end{adjustwidth}
}
% \charsd is like \paren in ScriptTeX, used for brief character
% stage directions. It's intended to set properly into a passage
% of dialog.
\newcommand{\charsd}[1]{%
- \begin{changemargin}{2in}{0in}%
- (#1)%
- \end{changemargin}}
+ {\def\everypar{\parskip=0pt\stageoldep}%
+ \stage{#1}\par\leavevmode}}
% Undocumented, for backwards compatibility
\newcommand{\initsd}[1]{\charsd{#1}}
@@ -167,9 +143,9 @@
% \opensd is opening stage directions, set differently from
% other stage directions; \opensd sets time and place.
\newcommand{\opensd}[1]{%
- \begin{changemargin}{2.5in}{0in}
+ \begin{adjustwidth}{2.5in}{0in}
(#1)%
- \end{changemargin}
+ \end{adjustwidth}
}
% \open is the same as \opensd
\newcommand{\open}[1]{\opensd{#1}}
@@ -181,9 +157,9 @@
\par
\center{\@author}
\vspace{5in}
- \begin{changemargin}{0in}{0in}
+ \begin{adjustwidth}{0in}{0in}
\ifthenelse{\not\isundefined{\@address}}{\@address}{}
- \end{changemargin}
+ \end{adjustwidth}
\end{titlepage}
\setcounter{page}{1}
}
@@ -193,21 +169,20 @@
\thispagestyle{empty}%
\center{\textsc{\castname}}%
\vspace{3ex}%
- \begin{changemargin}{0in}{0.5in}%
+ \begin{adjustwidth}{0in}{0.5in}%
}{%
- \end{changemargin}%
+ \end{adjustwidth}%
\setcounter{page}{0}%
\newpage%
}
% \addcharacter adds characters to the cast page.
\newcommand{\addcharacter}[2]{%
\begin{tabular}[2]{p{2in} p{4in}}
- \textsc{#1} & #2\\[\doublespacelength]
+ \textsc{#1} & #2\\[\parskip]
\end{tabular}
}
% Mark the end of the document.
\AtEndDocument{%
- \doublespace %
\hskip 2.5in %
\textsc{\theendname}%
}