[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Several suggestions for image support

From: David Kastrup
Subject: Re: Several suggestions for image support
Date: 24 Apr 2004 17:16:01 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Richard Stallman <address@hidden> writes:

>       So I think that
>     the space between two baselines should be
>     max(line space of newline, max(all glyph depths of upper line,0)
>                             +max(all glyph heights of lower line,0))
>     where depth is the extent of a glyph below the baseline, and the
>     height is the extent above.
> You may be right, but it occurs to me that we should see if text
> formatters have any guidance to offer us on how to decide this.

TeX is pretty quirky in this regard.  It has some design decisions
resulting from efficiency and memory considerations, and some that are
due to dealing best with pagination.  Since an editor window is
usually not intended to display paginated material but rather to
provide a view on part of a long scroll, we don't need to bother with
stuff like "flexible glue" that is used for fitting things better to a

Basically, lines are governed by the three values \baselineskip,
\lineskiplimit and \lineskip.  TeX tries to arrange lines such that
their baselines are \baselineskip apart.  If the descenders of the
upper line come closer than \lineskiplimit to the ascenders of the
lower line, however, TeX instead separates those parts of the lines by
using \lineskip between them.

The plain TeX values are 12pt for \baselineskip, 0pt for
\lineskiplimit, and 1pt for \lineskip.  There is a discontinuity
involved in those standard settings: the separation jumps from 0pt to
1pt once overlap can't be avoided anymore with the standard settings.

In calculating ascent and descent of a line, TeX uses only the maximum
of any actually involved characters and does not distinguish where on
the line these occur.  For an editor, this is certainly appropriate,
as we use rectangular areas of differing background color for
highlighting things.

When typesetting running text, TeX uses the values of the line spacing
variables that are current at the end of the paragraph.  This causes a
whole paragraph to be typeset with consistent (though sometimes
surprising) baseline distances.  This consistency is what I am mostly
worried about: if we have a few words of small print in a paragraph,
and auto-fill-mode happens to break between them, the newline will
belong to a face with a smaller baseline distance.

So I am not sure whether we should making changes of the baseline
distance as easy as changing a face for a few words in running text.
I don't have a much better idea, though.

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

[Prev in Thread] Current Thread [Next in Thread]