The dialogue package

dialogue environment (Frankenstein’s mouth)

            Matt Swift <swift@bu.edu>

Version: v1.0 Documentation revision: 1996/04/11

Abstract

The dialogue environment is for citing short passages of dialogue from a script.

Part I

Discussion

An example should be sufficient for most of the documentation:

%␣   \begin{dialogue}
\speak{Vladimir} Whare are all these corpses from?
\speak{Estragon} These skeletons.
\par\lips\par
\speak{Vladimir} A charnel-house!  A charnel-house!    page 41
Estragon has exited offstage to right and left and come ``panting'' back
and fallen into Vladimir's arms.
\speak{Estragon} I'm in hell!
\speak{Vladimir} Where were you?
\speak{Estragon} They're coming there too!
\speak{Vladimir} We're surrounded! \direct{\refer{Estragon} makes a rush
                 towards back.}  Imbecile!  There's no way out there.
                 \direct{\refer{He} takes \refer{Estragon} by the arms
                 and drags him towards front.  Gesture towards front.}
                 There!  Not a soul in sight!  Off you go!  Quick!
                 \direct{\refer{He} pushes \refer{Estragon} towards
                 auditorium.  \refer{Estragon} recoils in horror.}  You
                 won't?  \direct{\refer{He} contemplates auditorium.}
                 Well I can understand that.  Wait till I see.
                 \direct{\refer{He} reflects.}  Your only hope left is to
                 disappear.
\end{dialogue}

LOOKS LIKE:

Vladimir Whare are all these corpses from? Estragon These skeletons. … Vladimir A charnel-house! A charnel-house! page 41 Estragon has exited offstage to right and left and come “panting” back and fallen into Vladimir’s arms. Estragon I’m in hell! Vladimir Where were you? Estragon They’re coming there too! Vladimir We’re surrounded! Estragon makes a rush towards back. Imbecile! There’s no way out there. He takes Estragon by the arms and drags him towards front. Gesture towards front. There! Not a soul in sight! Off you go! Quick! He pushes Estragon towards auditorium. Estragon recoils in horror. You won’t? He contemplates auditorium. Well I can understand that. Wait till I see. He reflects. Your only hope left is to disappear.

dialogue
\speak      \speak {⟨speaker⟩}
\direct      \direct {⟨directions⟩}
\refer      \direct {⟨speaker⟩}
\ReferStyle
\DirectStyle
\DialogueLabel
\PreDialogue Part II

Implementation

1 Version control

\fileinfo \fileversion \filedate \docdate \PPOptArg These definitions must be the first ones in the file.
1 \def\fileinfo{dialogue environment (Frankenstein's mouth)}
2 \def\DoXNeeDME{}
3 \def\fileversion{v1.0}
4 \def\filedate{1996/04/11}
5 \def\docdate{1996/04/11}
6 \edef\PPOptArg {%
7 \filedate\space \fileversion\space \fileinfo
8 }

Stop right here if we’re just loading the file’s information, and don’t want to load this code for typesetting its documentation (only makes sense for certain packages). The JuStLaAdInFoRmAtIoN flag will be set by the documentation driver; the DoXNeeDME flag will be set in the dtx file, and will appear above if it’s set.

9 \makeatletter
10 \@ifundefined{JuStLoAdInFoRmAtIoN} {%
11 }{% ELSE
12 \@ifundefined{DoXNeeDME} {%
13  }{% ELSE
14  \UndefineCS\JuStLoAdInFoRmAtIoN
15  \usepackage{dialogue}%

16 }

17 \makeatother

18 \endinput

19 }

Now we check for L^{A}TEX2e and declare the package.

20 \NeedsTeXFormat{LaTeX2e}
21 \ProvidesPackage{dialogue}[\PPOptArg]

2 Requirements

22 \RequirePackage{blkcntrl,moredefs,relsize}

3 The macros

The standard classes set \partopsep, \parsep, \topsep, and \itemsep to positive values. \leftmargin goes to 2.5em in onecolumn. \labelsep is .5em;

\labelwidth = \leftmargin- \labelsep.
\refer
\ReferStyle
\direct
\DirectStyle

23 \NewTextFontCommand\refer\ReferStyle

24

25 \newcommand\ReferStyle {%
26 \scshape

27 }

28 \newcommand\direct [1] {%
29 [{\DirectStyle #1}]%

30 }

31 \newcommand\DirectStyle {%
32 \relsize{-1}%
33 \slshape

34 }

\DialogueLabel \PreDialogue dialogue The first line of a new speaker has the name flush with the left margin of the surrounding text, then the default \labelsep, then the first line of dialogue. Subsequent lines all begin 2.5em in, and end 2.5em before the surrounding text. Interparagraph space is the same as the surrounding text’s. Extra positive stretchability of .5ex is added between speakers; I hope that the units will be relative to the current size in the environment, not the current size when the setting is done. FIX: check.

35 \newcommand*\DialogueLabel [1] {%
36 \scshape\lowercase{#1}:\hfil

37 }

38 \newcommand\PreDialogue {%
39 \PreChunk

40 }

41 \newenvironment{dialogue} {%
42  \begin{list}{} {%
43  \setlength\itemsep{\z@ \@plus .5ex}%
44  \setlength\parsep{\parskip}%
45  \setlength\rightmargin{\leftmargin}%
46  \defcommand\speak [1] {\item[{##1}]}%
47  \let\makelabel\DialogueLabel
48  }%
49  \PreDialogue\relax

50  }{%
51 \end{list}%

52 }

Index

Numbers written in italic refer to the page where the corresponding entry is described, the ones underlined to the code line of the definition, the rest to the code lines where the entry is used.

begin=  \subitem *+\begin+, 42
def=  \subitem *+\def+, 1--5
defcommand=  \subitem *+\defcommand+, 46

dialogue=dialogue (en-

vironment), 2, \underline{35}

DialogueLabel=  \subitem *+\DialogueLabel+, \usage{2}, \main{35}
direct=  \subitem *+\direct+, \usage{2}, \main{23}
DirectStyle=  \subitem *+\DirectStyle+, \usage{2}, \main{23}
docdate=  \subitem *+\docdate+, \main{1}
DoXNeeDME=  \subitem *+\DoXNeeDME+, 2
edef=  \subitem *+\edef+, 6
end=  \subitem *+\end+, 51
endinput=  \subitem *+\endinput+, 18

environments:¿dialogue, 2, \underline{3}

filedate=  \subitem *+\filedate+, \main{1}
fileinfo=  \subitem *+\fileinfo+, \main{1}
fileversion=  \subitem *+\fileversion+, \main{1}

hfil=  \subitem *+\hfil+, 36
item=  \subitem *+\item+, 46
itemsep=  \subitem *+\itemsep+, 43
JuStLoAdInFoRmAtIoN=  \subitem *+\JuStLoAdInFoRmAtIoN+, 14
leftmargin=  \subitem *+\leftmargin+, 45
let=  \subitem *+\let+, 47
lowercase=  \subitem *+\lowercase+, 36
makeatletter=  \subitem *+\makeatletter+, 9
makeatother=  \subitem *+\makeatother+, 17
makelabel=  \subitem *+\makelabel+, 47
NeedsTeXFormat=  \subitem *+\NeedsTeXFormat+, 20
newcommand=  \subitem *+\newcommand+, 25, 28, 31, 35, 38
newenvironment=  \subitem *+\newenvironment+, 41
NewTextFontCommand=  \subitem *+\NewTextFontCommand+, 23
parsep=  \subitem *+\parsep+, 44
parskip=  \subitem *+\parskip+, 44

PPOptArg=  \subitem *+\PPOptArg+, \main{1}, 21
PreChunk=  \subitem *+\PreChunk+, 39
PreDialogue=  \subitem *+\PreDialogue+, \usage{2}, \main{35}
ProvidesPackage=  \subitem *+\ProvidesPackage+, 21
refer=  \subitem *+\refer+, \usage{2}, \main{23}
ReferStyle=  \subitem *+\ReferStyle+, \usage{2}, \main{23}
relax=  \subitem *+\relax+, 49
relsize=  \subitem *+\relsize+, 32
RequirePackage=  \subitem *+\RequirePackage+, 22
rightmargin=  \subitem *+\rightmargin+, 45
scshape=  \subitem *+\scshape+, 26, 36
setlength=  \subitem *+\setlength+, 43--45
slshape=  \subitem *+\slshape+, 33
space=  \subitem *+\space+, 7
speak=  \subitem *+\speak+, \usage{2}, 46
UndefineCS=  \subitem *+\UndefineCS+, 14
usepackage=  \subitem *+\usepackage+, 15
=  \subitem +, 43