On Wed, Jul 08, 2026 at 10:37:17AM +0000, Werner LEMBERG wrote:
> 
> [git version around 2026-Mar-09]
> 
> Consider this file `foo.texi`.
> 
> ```
> some long text for testing
> @image{foo.texi,,,replacement text}
> some long text for testing
> @image{foo.texi,,,replacement text}
> some long text for testing
> ```
> 
> The info file created with `makeinfo foo.texi` contains the following.
> 
> ```
> some long text for testing [replacement text] some long text for testing 
> [replacement text] some long text
> for testing
> ```
> 
> Note how the first line is far too long; it seems that the length of
> the replacement text in `@image` is not taken into account while
> computing the line length.
> 

That appears to be right, but there may not be a better way.  If the image
is displayed (presumably with a file name like foo.png rather than foo.texi),
as is the case with Emacs Info mode, then the line length may be appropriate -
depending on the width of the image, of course.

I'm of the understanding that Emacs Info mode is more used that standalone Info,
and so it makes sense to use the output that is better for Emacs Info mode.

One possible solution is to count images that are inline in paragraphs like
this as two or three screen columns wide, as inline images are likely a similar
size to a letter or slightly bigger.  (I'm thinking of a musical note symbol
embedded in a paragraph.)  This could produce good results for Emacs
Info and slightly decrease the overall line length for standalone Info.
It wouldn't be perfect, though, as it would depend on how images were used
in paragraphs (which is fairly unusual AFAIK).

Reply via email to