On Wed, Jul 08, 2026 at 10:37:17AM +0000, Werner LEMBERG wrote:
>
> 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.
Indeed, this is something that is still undecided. I have put this in
the tta/TODO file:
Punctuation and spaces before @image do not lead to a doubling of space.
In fact @image is completly formatted outside of usual formatting containers.
Not sure what should be the right way?
test in info_test/image_and_punctuation
To me the first question would be whether it is a good idea to reflow
an @image replacement text. If there is a txt file content included,
it could be better not to reflow it, considering that the txt file was
already rightly formatted.
In the Info output, an image is "quoted", with
\x{00}\x{08}[ as delimiter, with information on image file name, dpi,
depth, alt and text. For example:
Toto inline image ^@^H[image src="f--ile.png" alt="alt" text="Image
description\"\"\\."^@^H] that you can see.
^@ corresponds to \x{00} and ^H to \x{08}.
It is not known in advance which of this information is going to be used
to render the image by the Info reader. In particular, even if it was
clear that reflowing is a good thing, it is not known in advance which
text, if any, will be used, or whether the image itself will be used (as
done by the Emacs Info reader running under X).
Right now the replacement text is considered as 'raw' text, that is not
reflowed at end of columns, whose internal end of lines are kept as
is, and which has no effect on punctuation spaces. A bit like
0 length verbatim/example.
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.
It would be easier to reflow the plaintext output, but I do not think
that it is worth trying to have a better output for Plaintext and
images.
--
Pat