groff
[Top][All Lists]
Advanced

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

Re: [Groff] Formatting algorithm


From: Ulrich Lauther
Subject: Re: [Groff] Formatting algorithm
Date: Thu, 24 Apr 2014 23:44:37 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

On Wed, Apr 23, 2014 at 07:30:34PM -0400, Peter Schaffter wrote:
> On Wed, Apr 23, 2014, Ted Harding wrote:
> > I think some confusion is possibly arising here. See in-line below.
> >
> > > Doesn't a paragraph logically conclude at any request which introduces a
> > > break?  Or invocation of any macro which itself invokes such a request?
> > >  (In addition to an empty input line, or one with leading white space,
> > > which implies a break?)  All of these exhibit one common feature: the
> > > introduction of the break.
> > 
> > I think I have to disagree here. For example, in the middle of a
> > paragraph I may wish to put some text centred on lines by itself,
> > and this may be in the middle of a sentence -- perhaps a parenthetical
> > quotation. Or, in technical writing, a displayed equation in the
> > middle of a sentence.
> 
> This was my original thinking, but I'm inclined to see things
> Keith's way now.  The confusion you refer to arises from
> terminology.  There are logical paragraphs, which may include lists,
> equations, quotes, and whatever other material logically belongs to
> the paragraph, and there are "formatting paragraphs", if I may coin
> a phrase, which refer to chunks of text that need to be adjusted.
> 
> Any time you introduce a break, even within a logical paragraph, the
> preceding text needs to be adjusted.  I can't see any advantage to
> including the text after an in-paragraph insertion in the adjustment
> process, ....

Yes, the preceding text needs to be adjusted. But why shouldn't the
adjustment algorithm when working on one "physical paragraph" be allowed
to "steal" one or more words from the next physical part of the logical
paragraph. The advantage would be a better overall result due to a more
global look at the optimization problem - at least theoretically.
The more freedom is given to any optimization algorithm the better the
result. Another question is, whether the improvement is worth the
additional complexity - not of the algorithm itself, but of providing its
input, i.e. collecting the logical paragraph and still dealing with 
inserts like equations and such.

        ulrich



reply via email to

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