> Date: Wed, 08 Jul 2026 17:22:15 +0000
> Cc: [email protected]
> From: Werner LEMBERG <[email protected]>
> 
> > One thing is clear to me, this shows the limits of pre-reflowing the
> > text as is done in the Info format.  But besides that, I do not have
> > a clear idea on what would be the best output.
> 
> AFAIK, the image width is unknown while `makeinfo` is preparing the
> Info file.  Both `info` and `emacs` read this Info file; while `info`
> can only display the replacement text, `emacs` is able to show the
> image.
> 
> My conclusion is that only the width of the replacement text is known.
> Consequently, I think that for inline images in Info mode only the
> width of the replacement text (or a default value in case the
> replacement text is missing) can be used for pre-formatting a
> paragraph; the replacement text should be handled as if put into a
> `@w{}` box – I think it's better to have too short lines than too long
> ones.

TBH, I don't quite understand how the image width can be used for
filling the lines, even if known.  The width of an image is known in
pixels, but for filling purposes it must be converted to characters,
and that requires to know the size of the font to be used to show the
manual.  That's not something makeinfo can do.

Am I missing something?

My conclusions from this are:

  . inline images in Texinfo should be avoided at all costs
  . if we do want to support inline images _and_ fill the text with
    such images, then makeinfo should use the width of the text
    alternative for filling, and we should document that the text will
    be filled correctly when an image is displayed only if the image
    takes on display space that is no wider than the text alternative,
    something that the author of the Texinfo source must ensure

Reply via email to