groff
[Top][All Lists]
Advanced

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

Re: [Groff] Formatting algorithm


From: Peter Schaffter
Subject: Re: [Groff] Formatting algorithm
Date: Fri, 25 Apr 2014 11:57:06 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Apr 24, 2014, Ulrich Lauther wrote:
> > 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.

Agreed.

> 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.

That is indeed the question.  I rather suspect the formatting gains
would be minimal.  That said, if, as I posted earlier, paragraph
insertions begin by switching environments, then collecting the
entirety of a logical paragraph makes sense, leaving us with the
original premise that whenever a break is introduced into the text,
it signals the end of a chunk of text to be adjusted.

Ted--how often do you come across a situation where a paragraph
insertion has fully justified text above it, ie the last line is
justified?  IOW, this

  Lorem  ipsum dolor sit amet, consectetur adipiscing elit.  Sed at
  ante.  Mauris eleifend,  quam  a  vulputate  dictum,  massa  quam
  dapibus leo, eget vulputate orci purus ut lorem.  In fringilla mi  <= 
sentence continues

                        paragraph insertion

  in ligula.  Pellentesque aliquam quam vel dolor.   Nunc  adipisc‐
  ing.  Sed quam odio, tempus ac, aliquam molestie, varius ac, tel‐
  lus.  Vestibulum ut nulla aliquam risus rutrum interdum.

rather than this

  Lorem  ipsum dolor sit amet, consectetur adipiscing elit.  Sed at
  ante.  Mauris eleifend,  quam  a  vulputate  dictum,  massa  quam
  dapibus leo, eget vulputate orci purus ut lorem.                  <= break

                        paragraph insertion

  In  fringilla mi in ligula.  Pellentesque aliquam quam vel dolor.
  Nunc adipiscing.  Sed quam odio,  tempus  ac,  aliquam  molestie,
  varius  ac, tellus.  Vestibulum ut nulla aliquam risus rutrum in‐
  terdum.

-- 
Peter Schaffter
http://www.schaffter.ca



reply via email to

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