[Top][All Lists]

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

Re: LaTeX-Fill-Paragraph and inline images

From: Felix E. Klee
Subject: Re: LaTeX-Fill-Paragraph and inline images
Date: Sun, 09 Feb 2003 17:23:31 +0100
User-agent: KNode/0.7.1

Kai Gro├čjohann wrote:
>> Therefore, I'm looking for a LaTeX-Fill-Paragraph replacement that
>> breaks lines correctly when inline images are used. Instead of
>> specifying a fill column the user would specify the desired width of
>> paragraphs in pixels or centimeters. This might also be interesting
>> when using variable width fonts instead of fixed width fonts.
> Does this problem come from using images, or from using overlays?  I
> think it's probably the overlays, but I'm not sure.

What are overlays? The problem occurs because LaTeX-Fill-Paragraph 
formats text according to the underlying source code, it doesn't know 
about the inline images. An formatting algorithm that might work would 
be something like this:

1. Go to the beginning of a paragraph. 
2. Remove all newlines from that paragraph
3. Set the variable LINE_WIDTH to 0.
4. Add the width of the next visible entity (single character, inline
   image, ...) to LINE_WIDTH.
     a) In the paragraph add a newline before the last entity processed.
     b) Go back one entity.
     c) Continue at step 3 unless we're finished with formatting the
     Continue at step 4.


reply via email to

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