[comp.text] troff macro for drop-initials at beginning of paragraphs

bobm@agsm.unsw.oz (Robert Marks) (02/07/88)

"If you have to set very long copy, there are some typographical
devices which increase its readership ...
   ...
   2  If you start your copy with a drop-initial, you
   increase your readership by an average of 13 per cent."

					David Ogilvy, Ogilvy on Advertising.

Following the tip-off on the net some weeks ago, I dug out Ogilvy, and
read the above.  It certainly is the case that the news weekly magazines
and Scientific American and The Economist all use drop-initials. (The
Economist after its recent facelift has changed from Times Roman to Gaudy
and now uses drop-initials.)
Note: the macro will not work with .ls = 2 or greater, only with single
spacing, although there can be extra leading with .vs +whatever

#--------------------------------CUT HERE-------------------------------------
#! /bin/sh
#
# This is a shell archive.  Save this into a file, edit it
# and delete all lines above this comment.  Then give this
# file to sh by executing the command "sh file".  The files
# will be extracted into the current directory owned by
# you with default permissions.
#
# The files contained herein are:
#
# -rw-r-----   1 bobm     bobm        1676 Feb  7 17:39 dropinmm
#
echo 'x - dropinmm'
if test -f dropinmm; then echo 'shar: not overwriting dropinmm'; else
sed 's/^X//' << '________This_Is_The_END________' > dropinmm
X.\" The following is a short troff macro for creating drop-initials.
X.\"
X.de In		\"DI macro -- indent revert, trap turned off.
X'in
X.wh \\n(v2u
X..
X.de DI		\"Drop Initial letter to the next line.
X.\" Print a nothing to establish the top level with nl
X.br
X.tr ~
X~
X.\" Calculate the point size of the drop initial.
X.\" (Equal to two times the vertical spacing between base lines + 3 points)
X.\" (This works OK for us -- but since .v is device-dependent, you
X.\"  may have to find the correct factor -- here 1/10 -- by trial-and-error.)
X.nr pS 2*\\n(.v/10+3
X.\" Calculate the base-line position of the drop initial.
X.\" (Turn the temp indent off with a trap at this position,
X.\"  two lines below top -- from the printed ~ at nl.)
X.nr v2 2*\\n(.v+\\n(nl
X.\" Save the point size of the existing type.
X.nr fS \\n(.s
X.\" Need at least two lines (or more for larger drop initials).
X.ne 2
X.\" Break to move down a line (further breaks for larger initials).
X.br
X\\s(\\n(pS\\$1\\s(\\n(fS
X.\" Calculate the temporary indent around the drop initial.
X.nr hS \\w'\\s(\\n(pS\\$1\\s(\\n(fS\\^'
X.in +\\n(hSu
X.\" Move up to continue text.
X.sp -2
X.\" Set a trap to turn off the temporary indent.
X.wh \\n(v2u In
X..
X.\"
X.DI P
Xut this macro at the top of this file and ditroff it to your
Xfavourite output laser printer to see what it does.  (Remember that drop
Xinitials look best with at least two and preferably three lines of text
Xaround them, so that the large letter stands out.)
XNote that it uses .tr ~ to print nothing on the top line.
XFor larger -- three-line -- drop initials, change the contents
Xof the registers pS and v2, and the vertical movements down (with breaks)
Xand up (with .sp -N)
________This_Is_The_END________
if test `wc -l < dropinmm` -ne 45; then
	echo 'shar: dropinmm was damaged during transit (should have been 45 bytes)'
fi
fi		; : end of overwriting check
exit 0

bd@hpsemc.HP.COM (bob desinger) (02/19/88)

Here's a small fix to Robert Marks's cool .DI drop-initial macro.
The macro initially translates ~ to space but never restores
it---so in his sample paragraph (and any text after it), ~ prints
as space instead of ~.

The fix is simple:  just before the ".." that ends the .DI macro,
insert two lines:

	.\" Allow ~ to be printed in subsequent text.
	.tr ~~

The line right after ".tr ~~" should be the ".." closing request.

Thanks, Robert, for a great macro!