summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/stage
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-02-25 03:01:07 +0000
committerNorbert Preining <norbert@preining.info>2020-02-25 03:01:07 +0000
commite55e56ce482cc9d01a0b83f22dac4851eb4c0357 (patch)
tree70f092a544725d3d02ae011e0bbf877785658465 /macros/latex/contrib/stage
parent33f4ae660b866731387e4c21e528aaa283009d6c (diff)
CTAN sync 202002250301
Diffstat (limited to 'macros/latex/contrib/stage')
-rw-r--r--macros/latex/contrib/stage/Makefile5
-rw-r--r--macros/latex/contrib/stage/stage-documentation.pdfbin149275 -> 149248 bytes
-rw-r--r--macros/latex/contrib/stage/stage-documentation.tex2
-rw-r--r--macros/latex/contrib/stage/stage.cls83
4 files changed, 34 insertions, 56 deletions
diff --git a/macros/latex/contrib/stage/Makefile b/macros/latex/contrib/stage/Makefile
new file mode 100644
index 0000000000..7ec79acd03
--- /dev/null
+++ b/macros/latex/contrib/stage/Makefile
@@ -0,0 +1,5 @@
+pdf:
+ pdflatex stage-documentation
+
+zip: pdf
+ cd .. && zip -r stage.zip stage --exclude=stage/.git\* --exclude=.gitignore --exclude=*.cpt --exclude=*.log --exclude=*.aux
diff --git a/macros/latex/contrib/stage/stage-documentation.pdf b/macros/latex/contrib/stage/stage-documentation.pdf
index c60d22d2b6..57f797893c 100644
--- a/macros/latex/contrib/stage/stage-documentation.pdf
+++ b/macros/latex/contrib/stage/stage-documentation.pdf
Binary files differ
diff --git a/macros/latex/contrib/stage/stage-documentation.tex b/macros/latex/contrib/stage/stage-documentation.tex
index 1be157b45f..e1d24f936f 100644
--- a/macros/latex/contrib/stage/stage-documentation.tex
+++ b/macros/latex/contrib/stage/stage-documentation.tex
@@ -157,8 +157,6 @@ Here is a script template formatted with \LaTeX\ and \texttt{stage}. It should p
%%% The following items are optional. Uncomment to use.
% \address{}
-% \copyrightnotice{}
-% \draft{}
\begin{document}
diff --git a/macros/latex/contrib/stage/stage.cls b/macros/latex/contrib/stage/stage.cls
index d369724ccb..4756c8c89c 100644
--- a/macros/latex/contrib/stage/stage.cls
+++ b/macros/latex/contrib/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}%
}