[net.text] TeX Questions

req@warwick.UUCP (Russell Quin) (03/09/86)

I would like to know if TeX can handle the features mentioned below, and if so,
how. Ditroff can already do some of them, and the others can be hacked in, but
a subsequent move to TeX might mean that all the design (and programming) work
would become worthless.

Punctuation:

1	Hung punctuation  (this is where punctuation marks at the beginning or
end of a line extend into the margin in justified text.  It is chiefly used to
avoid making ugly `holes' in the otherwise neat straight lines of the margins).
Look at the above line, for example.

2	Punctuation a different size than the text  (this is sometimes done in
quotes or headings, as well as in book text when the punctuation marks are too
small (or to large).  Sometimes only some marks are affected, typically points
and quotes, and possibly accents).

Footnotes:

3	The problem here is to avoid carrying over onto the next page part any
part of a footnote that would leave behind a complete sentence (Hart's is even
stricter, requiring that the page break doesn't leave behind a complete phrase
or clause).  The idea is that footnotes which span several pages are confusing
enough as it is, without compounding the situation further!  There should be a
note to the effect that the footnote is continued overleaf, if appropriate, of
course.

End-of-sentence detection is difficult, of course, but the troff-style rule of
saying that a sentence ends when an input line ends with punctuation --- which
can be refined further by adding the rule that there be a capital at the start
of the next input text line --- seems to be sufficient in practice.  One might
also consider using limited NL-parsing in the manner of style and diction, but
this is beginning to sound like too much work for too little return.

Optical Alignment:

4	Large letters need to be set closer together than small ones.  Titling
often looks ragged if ``mechanical'' letterspacing is used to align the margin,
because some of the letters have ``holes'' in them.
A heading like		The
			Hung
			Punctuation
will often look odd if the cross-piece of the `T' doesn't protrude left beyond
the H and P.  The exact amount of overhang needs to be worked out manually for
each letter now, although it could conceivably be mechanized.  Ideally, though,
TeX (or Troff, or whatever) would be able to use that information to align the
title optically.  Since TeX already has kerning, can it already cope with this
case?  If not, how hard would it be to add it?  (I am not prepared to consider
solutions to any of these problems which are not automatic.  It's unacceptable
to have to type something like	{\align The // Hung // Punctuation }
or				{\hang ,}; for footnotes, it is reasonable for
users to start each sentence on a new line, however.)


There are other issues which cause difficulties, but I will leave them until I
need to deal with them!
Sometimes a document needs to be reprinted in a different style, and it's very
important that the number of textual alterations to be made is very low.  This
means that things like hung punctuation cannot be specifically inserted by the
writer, of course, as line-breaks may change.  (In any event, no-one is likely
to want to type (say) \*. or \*('' instead of . and '.  Perhaps careful use of
sed would make it possible.)  I am looking for elegant solutions.

Thankyou (in advance) for your help, as well as you patience in reading a long
article (set with hung punctuation on the right margin).

Russell
-- 
		... mcvax!ukc!warwick!req  (req@warwick.UUCP)
		... mcvax!ukc!warwick!frplist (frplist@warwick.UUCP)
	inchar = pinchar  /* XXX */

chris@umcp-cs.UUCP (Chris Torek) (03/14/86)

Fortunately, TeX can do a number of those things automatically,
since it has `one-character macros'.  See Appendix D of *The TeXbook*
for an example of hanging punctuation.  One-character macros can
be used to make punctuation come out in a different size or font.

Making footnotes that span pages break only within lines (or worse
yet, only within phrases) is more difficult; I do not see any way
to do it in TeX or in troff.  I would suggest instead simply forcing
all footnotes to be on one page always.  Chances are this will fail
for long footnotes, however.  Human typesetters probably also have
trouble setting such footnotes.

The kerning information that you would like to use for optical
alignment is not available outside the paragraph builder.  You
might be able to fake something with special fonts, but that seems
rather excessive.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 1415)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris@umcp-cs		ARPA:	chris@mimsy.umd.edu