[XeTeX] \XeTeXpdffile causes over-long line unless wrapped in \hbox

Gavin Smith gavinsmith0123 at gmail.com
Thu Apr 15 11:01:35 CEST 2021


If I XeTeX to display an image in text, like

\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

and then process with "xetex test.tex" on the command line, then the line
after the image is too long and goes into the margin.  You can see this
in the attached file.

I found wrapping the \XeTeXpdffile in an \hbox, thus:

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

fixed the problem, but I don't see why this should be necessary.

Is this a bug?

XeTeX reports its version as follows:

$ 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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.pdf
Type: application/pdf
Size: 9670 bytes
Desc: not available
URL: <https://tug.org/pipermail/xetex/attachments/20210415/d39a848d/attachment.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.pdf
Type: application/pdf
Size: 9142 bytes
Desc: not available
URL: <https://tug.org/pipermail/xetex/attachments/20210415/d39a848d/attachment-0001.pdf>


More information about the XeTeX mailing list.