The dialogue LaTeX package

dialogue environment (Frankenstein’s mouth)

Matt Swift <swift@alum.mit.edu>

Version: 1.1 Date: 1999/03/01

Documentation revision: 1996/04/11

Abstract

The dialogue environment is for citing short passages of scripted dialogue. It is not for typsetting a long script.

Contents

I Discussion 2

1 Dialogue 2 2 Programmer’s interface 3

II Implementation 4

3 Version control 4 4 Requirements 4 5 The macros 4

Part I

Discussion

1 Dialogue

An example will have to suffice for most documentation at the moment. \attrib is defined in the attrib package, also in the Frankenstein bundle.

\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!
\attrib{\play{Waiting for Godot}, 41 \normalcitations\cite{beckett:godot}}
\medskip
\direct{
Estragon has exited offstage to right and left and come ``panting'' back
and fallen into Vladimir's arms.  \emph{---Ed.}
}
\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.
\attrib{47}
\end{dialogue}

LOOKS LIKE:

vladimir: Whare are all these corpses from? estragon: These skeletons.

… vladimir: A charnel-house! A charnel-house!

(Waiting for Godot, 41 (Beckett 1954))

[ Estragon has exited offstage to right and left and come “panting” back and fallen into Vladimir’s arms. —Ed. ]

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.] Imbe-

cile! 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.

(47)

\direct \direct {⟨directions⟩} Inline stage directions. Can be used anywhere. \refer \refer {⟨speaker⟩} Refer to a character in a play. Can be used anywhere.

dialogue Inside the dialogue environment, commands \direct, and \refer behave

differently, but have the same function. \speak \speak {⟨speaker⟩} Introduce the speech of speaker ⟨speaker⟩ within a

dialogue environment.

2 Programmer’s interface

\ReferStyle
\DirectStyle
\DialogueLabel
\PreDialogue

These macros are available for adjusting the behavior of the user commands. I’m afraid you’ll have to read the (easy) code until I write better documentation.

Part II

Implementation

3 Version control

\fileinfo \DoXUsepackagE \HaveECitationS \fileversion \filedate \docdate \PPOptArg These definitions must be the first ones in the file.
 1 \def\fileinfo{dialogue environment (Frankenstein's mouth)}
 2 \def\DoXPackageS {dialogue,attrib}
 3 \def\initelyHavECitationS {}
 4 \def\fileversion{v1.1}
 5 \def\filedate{1999/03/01}
 6 \def\docdate{1996/04/11}
 7 \edef\PPOptArg {%
 8 \filedate\space \fileversion\space \fileinfo
 9 }

If we’re loading this file from a \ProcessDTXFile command (see the compsci package), then \JusTLoaDInformatioN will be defined; othewise we assume it is not (that’s why the FunkY NamE).

If we’re loading from \ProcessDTXFile, we want to load the packages listed in \DoXPackageS (needed to typeset the documentation for this file) and then bail out. Otherwise, we’re using this file in a normal way as a package, so do nothing. \DoXPackageS, if there are any, are declared in the dtx file, and, if you’re reading the typeset documentation of this package, would appear just above. (It’s OK to call \usepackage with an empty argument or \relax, by the way.)

10 \makeatletter% A special comment to help create bst files.  Don't change!
11 \@ifundefined{JusTLoaDInformatioN} {%
12 }{% ELSE (we know the compsci package is already loaded, too)
13 \UndefineCS\JusTLoaDInformatioN
14 \SaveDoXVarS
15 \eExpand\csname DoXPackageS\endcsname\In {%use \csname in case it's undefined
16  \usepackage{#1}%
17 }%
18 \RestoreDoXVarS
19 \makeatother
20 \endinput
21 }% A special comment to help create bst files.  Don't change!

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

22 \NeedsTeXFormat{LaTeX2e}
23 \ProvidesPackage{dialogue}[\PPOptArg]

4 Requirements

24 \RequirePackage{blkcntrl,moredefs,relsize}

5 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

25 \NewTextFontCommand\refer\ReferStyle

26

27 \newcommand\ReferStyle {%
28 \scshape

29 }

30 \newcommand\direct [1] {%
31 [{\DirectStyle #1}]%

32 }

33 \newcommand\DirectStyle {%
34 \relsize{-1}%
35 \slshape

36 }

\DialogueLabel \PreDialogue dialogue The first line of a new speaker has the speaker’s 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.

To do: Ensure that the units will be relative to the current size in the environment, not the current size when the setting is done.

37 \newcommand*\DialogueLabel [1] {%
38 \scshape\lowercase{#1}:\hfil

39 }

40 \newcommand\PreDialogue {%
41 \PreChunk

42 }

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

54 }

References

Beckett, Samuel. 1954. Waiting for Godot. First Evergreen ed. Translated from the French by the author. New York: Grove Press. Reprint, New York: Grove Press, 1956. Composed in 1948. First published as En attendant Godot in 1952. Premiered in French in 1953, in English in 1955.

Index

Numbers written in italic refer to the page where the corresponding entry is described; numbers underlined refer to the code line of the definition; numbers in roman refer to the code lines where the entry is used.

Symbols

\@ifundefined . . . . . 11

\@plus . . . . . . . . . . . 45

B

\begin . . . . . . . . . . . 44

C

\csname . . . . . . . . . . 15

D

\def . . . . . . . . . . . . . 1–6

\defcommand . . . . . . . 48

dialogue (environ-

ment) . . . . . 3, \underline{37}

\DialogueLabel . . . 3, \underline{37}

\direct . . . . . . . . . 3, \underline{25}

\DirectStyle . . . . . 3, \underline{25}

\docdate . . . . . . . . . . \underline{1}

\DoXPackageS . . . . . . . 2
\DoXUsepackagE . . . . . \underline{1}

E

\edef . . . . . . . . . . . . . 7 \eExpand . . . . . . . . . 15 \end . . . . . . . . . . . . . 53

\endcsname . . . . . . . 15

\endinput . . . . . . . . 20 environments:

dialogue . . . . . 3, \underline{37}

F

\filedate . . . . . . . . . \underline{1} \fileinfo . . . . . . . . . \underline{1}

\fileversion . . . . . . . \underline{1}

H

\HaveECitationS . . . . \underline{1}

\hfil . . . . . . . . . . . . 38

I

\In . . . . . . . . . . . . . 15

\initelyHavECitationS

. . . . . . . . . . . . . 3 \item . . . . . . . . . . . . 48 \itemsep . . . . . . . . . 45

J

\JusTLoaDInformatioN 13

L

\leftmargin . . . . . . . 47

\let . . . . . . . . . . . . . 49

\lowercase . . . . . . . 38

M

\makeatletter . . . . . 10
\makeatother . . . . . . 19
\makelabel . . . . . . . 49

N

\NeedsTeXFormat . . . 22
\newcommand . . . . . . .

. 27, 30, 33, 37, 40

\newenvironment . . . 43
\NewTextFontCommand 25

P

\parsep . . . . . . . . . . 46 \parskip . . . . . . . . . 46 \PPOptArg . . . . . . . \underline{1}, 23 \PreChunk . . . . . . . . 41

\PreDialogue . . . . . 3, \underline{37}
\ProvidesPackage . . 23

R

\refer . . . . . . . . . . 3, \underline{25}

\ReferStyle . . . . . . 3, \underline{25}

\relax . . . . . . . . . . . 51 \relsize . . . . . . . . . 34

\RequirePackage . . . 24
\RestoreDoXVarS . . . 18
\rightmargin . . . . . . 47

S

\SaveDoXVarS . . . . . . 14

\scshape . . . . . . . 28, 38

\setlength . . . . . 45–47

\slshape . . . . . . . . . 35 \space . . . . . . . . . . . . 8 \speak . . . . . . . . . . 3, 48

U

\UndefineCS . . . . . . . 13
\usepackage . . . . . . . 16

Z

\z@ . . . . . . . . . . . . . 45