[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.
5. If LINE_WIDTH > MAX_LINE_WIDTH then
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
paragraph.
else
Continue at step 4.
Felix
- LaTeX-Fill-Paragraph and inline images, Felix E. Klee, 2003/02/08
- Re: LaTeX-Fill-Paragraph and inline images, Kai Großjohann, 2003/02/09
- Re: LaTeX-Fill-Paragraph and inline images,
Felix E. Klee <=
- Re: LaTeX-Fill-Paragraph and inline images, David Kastrup, 2003/02/09
- Re: LaTeX-Fill-Paragraph and inline images, Felix E. Klee, 2003/02/09
- Re: LaTeX-Fill-Paragraph and inline images, David Kastrup, 2003/02/10
- Re: LaTeX-Fill-Paragraph and inline images, Felix E. Klee, 2003/02/21
- Re: LaTeX-Fill-Paragraph and inline images, David Kastrup, 2003/02/21
- Re: LaTeX-Fill-Paragraph and inline images, Felix E. Klee, 2003/02/21
- Re: LaTeX-Fill-Paragraph and inline images, David Kastrup, 2003/02/21
- Re: LaTeX-Fill-Paragraph and inline images, Glenn Morris, 2003/02/21
- Re: LaTeX-Fill-Paragraph and inline images, Stefan Monnier <address@hidden>, 2003/02/21
- Re: LaTeX-Fill-Paragraph and inline images, Felix E. Klee, 2003/02/22