>>>>> Here's a file that I ran with pdftex and with luatex: both worked. >>>>> If this looks right, the code can be moved into texinfo.tex. >>> >>> \ifx\XeTeXrevision\thisisundefined >>> \else >>> \XeTeXinputencoding "bytes" >>> \fi >>> >>> although I haven't been able to test this. >> >> I've tried the attached file. >> Both pdfTeX and XeTeX, it works fine in my environment. >> Thank you. > > I've noticed that XeTeX with texinfo.tex can not use @image. > Here is a patch that I've tried to make.
It seems that \XeTeXpdffile changes input encoding. So I add ``\XeTeXinputencoding "bytes"''.
--- texinfo.tex.org 2016-01-05 22:26:04.245558200 +0900 +++ texinfo.tex 2016-01-06 00:50:37.963751000 +0900 @@ -1449,6 +1449,48 @@ \let\pdfmakeoutlines = \relax \fi % \ifx\pdfoutput +\ifx\XeTeXrevision\thisisundefined +\else + \def\doxeteximage#1#2#3{% + \def\xeteximagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% + \def\xeteximageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% + % + \let\xeteximgext=\empty + \def\xeteximgpdf{0} + \begingroup + \openin 1 #1.pdf \ifeof 1 + \openin 1 #1.PDF \ifeof 1 + \openin 1 #1.png \ifeof 1 + \openin 1 #1.jpg \ifeof 1 + \openin 1 #1.jpeg \ifeof 1 + \openin 1 #1.JPG \ifeof 1 + \errmessage{Could not find image file #1 for XeTeX}% + \else \gdef\xeteximgext{JPG}% + \fi + \else \gdef\xeteximgext{jpeg}% + \fi + \else \gdef\xeteximgext{jpg}% + \fi + \else \gdef\xeteximgext{png}% + \fi + \else \gdef\xeteximgext{PDF} \gdef\xeteximgpdf{1}% + \fi + \else \gdef\xeteximgext{pdf} \gdef\xeteximgpdf{1}% + \fi + \closein 1 + \endgroup + % + \ifnum\xeteximgpdf=1 + \XeTeXpdffile "#1".\xeteximgext "" + \else + \XeTeXpicfile "#1".\xeteximgext "" + \fi + \ifdim \wd0 >0pt width \xeteximagewidth \fi + \ifdim \wd2 >0pt height \xeteximageheight \fi \relax + % + \XeTeXinputencoding "bytes" + } +\fi \message{fonts,} @@ -9078,10 +9120,14 @@ \ifpdf \dopdfimage{#1}{#2}{#3}% \else - % \epsfbox itself resets \epsf?size at each figure. - \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi - \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi - \epsfbox{#1.eps}% + \ifx\XeTeXrevision\thisisundefined + % \epsfbox itself resets \epsf?size at each figure. + \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi + \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi + \epsfbox{#1.eps}% + \else + \doxeteximage{#1}{#2}{#3}% + \fi \fi % \ifimagevmode