bug-texinfo
[Top][All Lists]
Advanced

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

Re: buggy xetex support of (inline) images


From: Gavin Smith
Subject: Re: buggy xetex support of (inline) images
Date: Wed, 14 Apr 2021 10:51:50 +0100
User-agent: Mutt/1.9.4 (2018-02-28)

On Sun, Apr 11, 2021 at 12:24:07PM +0200, Werner LEMBERG wrote:
> 
> [XeTeX 3.141592653-2.6-0.999993 (TeX Live 2021)]
> [texinfo 2021-04-08.19]
> 
> Consider the following example file `test.texi` (image file
> `image.pdf` is attached):
> 
> ```
> \input texinfo
> 
> test test test test test test test test test test test test test
> test test test test test test test test test test test test test
> test test test test test test test test test test test test test
> test test test test test test test test test test test test test
> @image{image}
> test test test test test test test test test test test test test
> test test test test test test test test test test test test test
> test test test test test test test test test test test test test
> test test test test test test test test test test test test test
> 
> @bye
> ```
> 
> Using pdftex, everything is fine.  However, calling
> 
>   PDFTEX=xetex texi2pdf test.texi
> 
> incorrectly shifts the remaining line after the image to the right
> (see attached image) – since xetex doesn't produce an overfull line
> warning I guess it's a problem in the texinfo support for xdvipdfmx.
> 
> For testing purposes I also tried xetex from TeXLive 2015, and I get
> the same (bad) result.

I got the same result.  I reduced the failing case to the following:

\def\img{\XeTeXpdffile "image.pdf"\relax}

test test test test test test test test test test test test test
test test test test test test test test test test test test test
test test test test test test test test test test test test test
test test test test test test test test test test test test test
\img
test test test test test test test test test test test test test
test test test test test test test test test test test test test
test test test test test test test test test test test test test
test test test test test test test test test test test test test

\end

which you process with "xetex test.tex" on the command line.  I don't
know why, but I found wrapping the \XeTeXpdffile in an \hbox, thus:

\def\img{\hbox{\XeTeXpdffile "image.pdf"\relax}}

fixed the problem.  A bug in XeTeX maybe?  My version outputs the following
when run:

$ xetex test.texi
This is XeTeX, Version 3.14159265-2.6-0.99998 (TeX Live 2017/Debian) (preloaded 
format=xetex)
 restricted \write18 enabled.
entering extended mode
(./test.texi [1] )
Output written on test.pdf (1 page).
Transcript written on test.log.

Should this be reported to the xetex developers?

I didn't look into xdvipdfmx as it looks like texi2dvi doesn't run this
program directly.

I went and added an \hbox in the same place in texinfo.tex (commit 15ed35da).

It appears to give good results with your input both with
"PDFTEX=xetex texi2pdf test.texi" and "xetex test.texi".

However, please test the fix with a document with more images in it.





reply via email to

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