The attrib LaTeX package

attribution of block elements (Frankenstein’s hat)

Matt Swift <swift@alum.mit.edu>

Version: 1.1 Date: 1999/02/24

Documentation revision: 1999/02/24

Abstract

The \attrib macro attributes block elements, for example when citing a reference after a block quotation.

Contents

I Discussion 2

1 Attributions 2 2 Examples 3 3 Programmer’s Interface 8

II Implementation 10

4 Version control 10 5 Macros 10

III Something you can’t use 13

Part I

Discussion

1 Attributions

\attrib I wrote \attrib in order to have an abstract way to attribute the source of quotations of prose or verse in an academic style. The formatting is that recommended by the Chicago Manual of Style (University of Chicago Press 1993), except that attributions of block quotations of prose are given flush right, to allow the reader to locate a quotation more quickly when returning to the text.

Use \attrib{⟨attribution⟩} at the end of any block of text, such as the quote, quotation, verse, and dialogue environments (the last is defined in the dialogue package, also part of the Frankenstein bundle.

For verse, you ought to use either a blank line or a final \\\ before your attribution. For quote, quotation, and dialgoue, don’t leave a blank line.

\attrib will place the attribution flush right to the margins of the block. If there is enough room on the last line, the attribution will be given on the last line, otherwise it moves down to a line of its own.

You can put pretty much anything as the text of the attribution, including citations and footnotes.

For those using the achicago and abbrevs packages (also in the Frankenstein bundle), \citework works very well. If you’re using regular \cite or another package, I recommend using the FIX hook below to remove the usual parens or braces around citations that occur within the \attrib argument. It makes more sense to me that way.

\normalcitations If parens are normally around citations, they are removed when citations occur within attributions. The idea is that you can simply write \attrib{\cite{key}} and what normally surrounds the citation will be replaced with \PreTrib and \PostTrib (which of course could be the same thing, but doing it this way allows attributions to contain things other than just a citation and still everything will look right).

Whenever within an attribution you want the normal behavior of citations back, write \normalcitations. \normalcitations is automatically used within footnotes within attributions; it’s used in the epigraph package; and occasionally a user will want to invoke it, when the attribution is unusual. I find that most attributions are either just a citation, or they do not have a citation at all. Sometimes I’ve wanted an attribution consisting of a citation plus some other text, for which cases I provided \normalcitations as a user command.

To do: Right now the only time there is any concept of “normal” or altered behavior of \cite commands is with the achicago package. I should make it so that \attrib by default leaves off braces, brackets, etc, around citations, for the standard definition of \cite also.

2 Examples

Following are several examples that use \attrib. They should be self-explanatory.

\begin{quotation}
[My plays] deal with distress.  Some people object to this in my writing.
At a party an English intellectual---so called---asked me why I write always
about distress.  As if it were perverse to do so!  He wanted to know if my
father had beaten me or my mother had run away from home to give me an
unhappy childhood.  I told him no, that I had had a very happy childhood.
Then he thought me more perverse than ever.  I left the party as soon as
possible and got into a taxi.  On the glass partition between me and the
driver were three signs: one asked for help for the blind, another help for
orphans, and the third for relief for the war refugees.  One does not have to
look for distress.  It is screaming at you even in the taxis of London.
\attrib{\cite[24]{driver:beckett:madeleine}}
\end{quotation}

LOOKS LIKE:

[My plays] deal with distress. Some people object to this in my writing.

At a party an English intellectual—so called—asked me why I write always about distress. As if it were perverse to do so! He wanted to know if my father had beaten me or my mother had run away from home to give me an unhappy childhood. I told him no, that I had had a very happy childhood. Then he thought me more perverse than ever. I left the party as soon as possible and got into a taxi. On the glass partition between me and the driver were three signs: one asked for help for the blind, another help for orphans, and the third for relief for the war refugees. One does not have to look for distress. It is screaming at you even in the taxis of London. (Driver 1961, 24)

\providelength\mtslen
\newcommand\makethisspace [1] {%
\settowidth{\mtslen}{#1}%
\hspace*{\mtslen}%
}
\begin{verse}
\makethisspace{Where Joy for ever dwells:} Hail horrours, hail \\
Infernal World, and thou profoundest Hell \\
Receive thy new Possessor: One who brings \\
A mind not to be chang'd by Place or Time. \\
The mind is its own place, and in it self \\
Can make a Heav'n of Hell, a Hell of Heav'n. \\
What matter where, if I be still the same, \\

And what I should be, all but less then he \\
Whom Thunder hath made greater?  Here at least \\
We shall be free; th' Almighty hath not built \\
Here for his envy, will not drive us hence: \\
Here we may reign secure, and in my choyce \\
To reign is worth ambition though in Hell: \\
Better to reign in Hell, then serve in Heav'n.
\attrib{\booktitle{Paradise Lost} 1.250--63,
        \cite{milton:riverside:paralost}}
\end{verse}

LOOKS LIKE:

Hail horrours, hail

Infernal World, and thou profoundest Hell Receive thy new Possessor: One who brings A mind not to be chang’d by Place or Time. The mind is its own place, and in it self Can make a Heav’n of Hell, a Hell of Heav’n. What matter where, if I be still the same, And what I should be, all but less then he Whom Thunder hath made greater? Here at least We shall be free; th’ Almighty hath not built Here for his envy, will not drive us hence: Here we may reign secure, and in my choyce To reign is worth ambition though in Hell: Better to reign in Hell, then serve in Heav’n.

(Paradise Lost 1.250–63, Milton 1998)

You can have a footnote inside the attribution. The boxed example below is meant to approximate a whole page (that is, the footnote appears at the bottom of the page, not directly underneath the quotation).

\begin{verse}
Jacke boy, ho boy newes,\\
\quad the cat is in the well,\\
let us ring now for her Knell,\\
\quad ding dong ding dong Bell.
\attrib{\cite[149]{opie:nursery}\footnote {%
Perhaps more familiar is the nursery rhyme that begins ``Ding,
dong, bell, / Pussy's in the well,'' which Opie and Opie also cite.  It does
not seem clear in that rhyme, however, without contextual knowledge, that the
cat has died and the bell rings its knell.}}
\end{verse}

LOOKS LIKE:

Jacke boy, ho boy newes,

the cat is in the well, let us ring now for her Knell,

ding dong ding dong Bell.

(Opie and Opie 1952, 149^{a})

aPerhaps more familiar is the nursery rhyme that begins “Ding, dong, bell, / Pussy’s in the well,” which Opie and Opie also cite. It does not seem clear in that rhyme, however, without contextual knowledge, that the cat has died and the bell rings its knell.

Here is a quotation from Beckett 1953:

\newwork\watt{Watt}
\begin{quote}
One day Watt, coming out from behind a bush, almost ran into Mr~Knott,
which for an instant troubled Watt greatly, for he had not quite finished
adjusting his dress.  But he need not have been troubled.  For Mr~Knott's
hands were behind his back, and his head bowed down, towards the ground.
Then Watt in his turn looking down at first saw nothing but the short green
grass, but when he had looked a little longer he saw a little blue flower
and close by a fat worm burrowing into the earth.  So this was what had
attracted Mr~Knott's attention, perhaps.  So there for a short time they
stood together, the master and the servant, the bowed heads almost touching
\lips, until the worm was gone and only the flower remained.  One day the
flower would be gone and only the worm remain, but on this particular day
it was the flower that remained, and the worm that went.  And then Watt,
looking up, saw that Mr~Knott's eyes were closed, and heard his breathing,
soft and shallow, like the breathing of a child asleep.
\attrib{\citework{145--46}{watt}}
\end{quote}

LOOKS LIKE:

One day Watt, coming out from behind a bush, almost ran into Mr Knott, which for an instant troubled Watt greatly, for he had not quite finished adjusting his dress. But he need not have been troubled. For Mr Knott’s hands were behind his back, and his head bowed down, towards the ground. Then Watt in his turn looking down at first saw nothing but the short green grass, but when he had looked a little longer he saw a little blue flower and close by a fat worm burrowing into the earth. So this was what had attracted Mr Knott’s attention, perhaps. So there for a short time they stood together, the master and the servant, the bowed heads almost touching …, until the worm was gone and only the flower remained. One day the flower would be gone and only the worm remain, but on this particular day it was the flower that remained, and the worm that went. And then Watt, looking up, saw that Mr Knott’s eyes were closed, and heard his breathing, soft and shallow, like the breathing of a child asleep. (Watt, 145–46)

Finally, here’s a very simple example from the same book. When the context is clear, you might just want page numbers in the attribution.

\begin{quote}
For Watt now found himself in the midst of things which, if they
consented to be named, did so as it were with reluctance.\lips Looking at
a pot, for example, \lips it was in vain that Watt said, Pot, pot.  Well,
perhaps not quite in vain, but very nearly. \lips It resembled a pot, it
was almost a pot, but it was not a pot of which one could say, Pot, pot,
and be comforted.  It was in vain that it answered, with unexceptionable
adequacy, all the purposes, and performed all the offices, of a pot, it
was not a pot.  And it was just this hairbreadth departure from the
nature of a true pot that so excruciated Watt\lips.  For he could always
hope, of a thing of which he had never known the name, that he would
learn the name, some day, and so be tranquillized.
\attrib{81--82}
\end{quote}

LOOKS LIKE:

For Watt now found himself in the midst of things which, if they consented to be named, did so as it were with reluctance. … Looking at a pot, for example, … it was in vain that Watt said, Pot, pot. Well, perhaps not quite in vain, but very nearly. … It resembled a pot, it was almost a pot, but it was not a pot of which one could say, Pot, pot, and be comforted. It was in vain that it answered, with unexceptionable adequacy, all the purposes, and performed all the offices, of a pot, it was not a pot. And it was just this hairbreadth departure from the nature of a true pot that so excruciated Watt. … For he could always hope, of a thing of which he had never known the name, that he would learn the name, some day, and so be tranquillized.

(81–82)

Here’s an example of use with the dialogue environment. Not much different than the others, but the quotes are nice, and I’ll demonstrate a use of \normalcitations. b’s speeches are interspersed through the play with a’s and c’s, but it’s interesting to read them consecutively.

\begin{dialogue}
\speak{b} on the stone together in the sun on the stone at the edge of the
  little wood and as far as eye could see the wheat turning yellow vowing every
  now and then you loved each other just a murmur not touching or anything of
  that nature you one end of the stone she the other long low stone like
  millstone no looks just there on the stone in the sun with the little wood
  behind gazing at the wheat or eyes closed all still no sign of life not a
  soul abroad no sound

\speak{b} all still just leaves and ears and you too still on the stone in a
daze no sound not a word only every now and then to vow you loved each other
just a murmur one thing could ever bring tears till they dried up altogether
that thought when it came up among the others floated up that scene
\speak{b} on the stone in the sun gazing at the wheat or the sky or the eyes
closed nothing to be seen but the wheat turning yellow and the blue sky
vowing every now and then you loved each other just a murmur tears without
fail till they dried up altogether suddenly there in whatever thoughts you
might be having whatever scenes perhaps way back in childhood or the womb
worst of all or that old Chinaman long before Christ born with long white
hair
\speak{b} no sight of the face or any other part never turned to her nor she to
you always parallel like on an axle-tree never turned to each other just
blurs on the fringes of the field no touching or anything of that nature
always space between if only an inch no pawing in the manner of flesh and
blood no better than shades no worse if it wasn't for the vows
\speak{b} \lips on the fringe of the field and every now and then in the great
peace like a whisper so faint she loved you
\attrib{\playtitle{That Time}{} \normalcitations\cite{beckett:csp:that}}
\end{dialogue}

LOOKS LIKE:

b: on the stone together in the sun on the stone at the edge of the little wood and as far as eye could see the wheat turning yellow vowing every now and then you loved each other just a murmur not touching or anything of that nature you one end of the stone she the other long low stone like millstone no looks just there on the stone in the sun with the little wood behind gazing at the wheat or eyes closed all still no sign of life not a soul abroad no sound

b: all still just leaves and ears and you too still on the stone in a daze no sound not a word only every now and then to vow you loved each other just a murmur one thing could ever bring tears till they dried up altogether that thought when it came up among the others floated up that scene

b: on the stone in the sun gazing at the wheat or the sky or the eyes closed nothing to be seen but the wheat turning yellow and the blue sky vowing every now and then you loved each other just a murmur tears without fail till they dried up altogether suddenly there in whatever thoughts you might be having whatever scenes perhaps way back in childhood or the womb worst of all or that old Chinaman long before Christ born with long white hair

b: no sight of the face or any other part never turned to her nor she to you always parallel like on an axle-tree never turned to each other just blurs on the fringes of the field no touching or anything of that nature always space between if only an inch no pawing in the manner of flesh and blood no better than shades no worse if it wasn’t for the vows

b: … on the fringe of the field and every now and then in the great peace

like a whisper so faint she loved you (“That Time” (Beckett 1984))

3 Programmer’s Interface

You might want to use \attrib as part of some other command you define. For example, I wrote a command for epigraphs, \epigraph{⟨text⟩}attribution, which used \attrib internally. For this type of thing, and also in general I suppose, you might want to change the behavior of \attrib.

\AttribMinSkip \AttribMinSkip is a length, the minimum amount of horizontal space that must come after any previous text and before the attribution. The default value

is 2em.

\PreTrib When you write \attribattribution, \PreTrib will immediately precede \PostTrib ⟨attribution⟩ and \PostTrib will immediately follow it. Notice how the attri-

butions in the examples above were in parentheses, but we didn’t have to write them. The default value of \PreTrib is a left parenthesis and the default value of \PostTrib is a right parenthesis. \PreTrib and ⟨attribution⟩ are executed inside a group that doesn’t include ), and \PostTrib is executed in a group all by itself, like this: {\PreTrib\relax#1}{\PostTrib}. Honestly I can’t tell you right now why it’s done this way, but I’m sure I have some good reason for it!

\AttribInit \AttribInit is an hook, empty by default, that gets executed after some standard setup but before the core of the \attrib macro. It is executed within a group that includes \PreTrib, ⟨attribution⟩, and \PostTrib, so perhaps it is appropriate for a font style change or something (I haven’t made use of it myself).

Part II

Implementation

4 Version control

\fileinfo \DoXUsepackagE \HaveECitationS \fileversion \filedate \docdate \PPOptArg These definitions must be the first ones in the file.
 1 \def\fileinfo{attribution of block elements (Frankenstein's hat)}
 2 \def\DoXPackageS {attrib,dialogue}
 3 \def\initelyHavECitationS {}
 4 \def\fileversion{v1.1}
 5 \def\filedate{1999/02/24}
 6 \def\docdate{1999/02/24}
 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{attrib}[\PPOptArg]
24 \RequirePackage{moredefs}

5 Macros

\AttribMinSkip
\PreTrib
\PostTrib

25 \newlength{\AttribMinSkip}
26 \setlength{\AttribMinSkip}{2em}
27 \newcommand\PreTrib {%
28 (%

29 }

30 \newcommand\PostTrib {%
31 )%

32 }

\AttribInit \at@init This heart of this code is from the TEXbook (Knuth 1986, 106). If you contribute anything to the horizontal or vertical list before the \unskip, it will cancel the effect of the \unskip. You probably don’t want to do that.

33 \ReserveCS\AttribInit
34 \newcommand\at@init {%
35 \SaveCS\footnote
36 \def\footnote {%
37  \normalcitations\MDSavedfootnote
38 }%
39 \SaveCS\PreCiteWork
40 \SaveCS\PostCiteWork
41 \def\PreCiteWork {%
42  \csname
43 }%
44 \def\PostCiteWork {%
45  \relax\end{lrbox}\usebox{\sc@box@a}%
46 }%
47 \SaveCS\PreCite
48 \SaveCS\PostCite
49 \let\PreCite\ShortEmpty
50 \let\PostCite\ShortEmpty

If there’s a blank line before the \attrib, we want to leave \parskip extra space above.

51 \ifhmode
52  \unskip
53 \fi
54 \AttribInit

55 }

\normalcitations
56 \newcommand* \normalcitations {%
57 \RestoreCS\PreCite
58 \RestoreCS\PostCite
59 \RestoreCS\PreCiteWork
60 \RestoreCS\PostCiteWork

61 }

\attrib Knuth says that \vadjust is more efficient here than \hbox, but I don’t understand why: I guess it’s simply a trivial non-discardable item on the horizontal list (Knuth 1986, 316).

62 \newcommand\attrib [1] {%
63 \begingroup
64  \at@init
65  \nobreak\hfil\penalty50%
66  \hskip\AttribMinSkip
67  \vadjust{}\nobreak\hfil
68  {\PreTrib\relax#1}{\PostTrib}%
69  \parfillskip\z@
70  \nobreak
71  \finalhyphendemerits0%
72  \par
73 \endgroup

74 }

Part III

Something you can’t use

\attribstar There is one macro, \attribstar, in this package that you can’t use because you don’t have a package that I haven’t released yet. I don’t want to release it because it still has a couple of small but significant problems that can lead to mistakes. If I took \attribstar out of this package, however, I’d have to maintain two different versions of attrib. So here is a glimpse of a future bright star.

   \DescribeMacro\attribstar

Use this instead of a standard footnote in an attribution when you want the note to appear on the page of the quotation. That is, it is not a substantive note, but something like “italics mine” or “ellipses in original” which belongs there on the page, not in endnotes, in case footnotes are ever moved there.

 1 \newcommand\attribstar [2] {%
 2 \begingroup
 3  \addto@macro\PostTrib {%
 4  \normalcitations
 5  \starnote{#2}%
 6  }%
 7  \attrib{#1}%
 8 \endgroup
 9 }

References

Beckett, Samuel. 1953. Watt. Paris: Olympia Press. Reprint, New York: Grove Press, 1959.

. 1984. “That Time.” In Collected Shorter Plays, 225–35. New York: Grove Press.

Driver, Tom F. 1961. “Beckett by the Madeleine.” The Columbia University Forum 4 (3): 21–25 (summer).

Knuth, Donald Ervin. 1986. The TEXbook. 16th printing, revised. Volume A of Computers & Typesetting. Illustrated by Duane Bibby. Reading MA: Addison Wesley. First published in 1984.

Milton, John. 1998. “Paradise Lost.” In The Riverside Milton, edited by Roy Flannagan, 296–710. Boston: Houghton Mifflin.

Opie, Iona and Peter Opie, eds. 1952. The Oxford Dictionary of Nursery Rhymes. Corrected ed. Oxford: Clarendon Press. First published in 1951.

University of Chicago Press. 1993. The Chicago Manual of Style. 14th ed. Chicago: University of Chicago Press.

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.

Symbols

\@ifundefined . . . . . 11

A

\addto@macro . . . . . . . 3

\at@init . . . . . . . \underline{33}, 64 \attrib . . . . . . . 2, 7, \underline{62}

\AttribInit . . . . . . 9, \underline{33}
\AttribMinSkip 8, \underline{25}, 66
\attribstar . . . . . . . . \underline{1}

B

\begingroup . . . . . . 2, 63

C

\csname . . . . . . . . 15, 42

D

\def . . . . . 1–6, 36, 41, 44 \docdate . . . . . . . . . . \underline{1}

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

E

\edef . . . . . . . . . . . . . 7 \eExpand . . . . . . . . . 15 \end . . . . . . . . . . . . . 45

\endcsname . . . . . . . 15

\endgroup . . . . . . . 8, 73 \endinput . . . . . . . . 20

F

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

\fileversion . . . . . . . \underline{1}
\finalhyphendemerits 71

\footnote . . . . . . 35, 36

H

\HaveECitationS . . . . \underline{1}

\hfil . . . . . . . . . . 65, 67 \hskip . . . . . . . . . . . 66

I

\ifhmode . . . . . . . . . 51 \In . . . . . . . . . . . . . 15

\initelyHavECitationS

. . . . . . . . . . . . . 3

J

\JusTLoaDInformatioN 13

L

\let . . . . . . . . . . . 49, 50

M

\makeatletter . . . . . 10
\makeatother . . . . . . 19
\MDSavedfootnote . . 37

N

\NeedsTeXFormat . . . 22
\newcommand . . . . . 1,

27, 30, 34, 56, 62

\newlength . . . . . . . 25

\nobreak …. 65, 67, 70

\normalcitations . .

. . . . . . 2, 4, 37, \underline{56}

P

\par . . . . . . . . . . . . . 72

\parfillskip . . . . . . 69

\penalty . . . . . . . . . 65 \PostCite … 48, 50, 58

\PostCiteWork 40, 44, 60

\PostTrib . . 3, 8, \underline{25}, 68 \PPOptArg . . . . . . . \underline{1}, 23 \PreCite …. 47, 49, 57

\PreCiteWork . 39, 41, 59

\PreTrib . . . . . 8, \underline{25}, 68

\ProvidesPackage . . 23

R

\relax . . . . . . . . . 45, 68

\RequirePackage . . . 24
\ReserveCS . . . . . . . 33
\RestoreCS . . . . . 57–60
\RestoreDoXVarS . . . 18

S

\SaveCS 35, 39, 40, 47, 48

\SaveDoXVarS . . . . . . 14

\sc@box@a . . . . . . . . 45

\setlength . . . . . . . 26
\ShortEmpty . . . . . 49, 50

\space . . . . . . . . . . . . 8 \starnote . . . . . . . . . 5

U

\UndefineCS . . . . . . . 13

\unskip . . . . . . . . . . 52 \usebox . . . . . . . . . . 45

\usepackage . . . . . . . 16

V

\vadjust . . . . . . . . . 67

Z

\z@ . . . . . . . . . . . . . 69