[XeTeX] jpg image and text overlapping

Gildas Hamel gweltaz at ucsc.edu
Mon Aug 4 07:09:27 CEST 2014


On Aug 3, 2014, at 17:48, Elliott Roper <elliott at yrl.co.uk> wrote:
> 
> 
> On 4 Aug 2014, at 00:48, Herbert Schulz <herbs at wideopenwest.com> wrote:
> 
>> 
>> On Aug 3, 2014, at 6:27 PM, Gildas Hamel <gweltaz at ucsc.edu> wrote:
>> 
>>> % !TEX TS-program = xelatexmk
>>> % !TEX encoding = UTF-8 Unicode
>>> 
>>> \documentclass[12pt]{article}
>>> \usepackage{fontspec}
>>> \usepackage{lipsum}
>>> \usepackage{graphicx}
>>> 
>>> \begin{document}
>>> \lipsum
>>> \begin{figure}[h]
>>>   \includegraphics[scale=0.25]{tombe.jpg}
>>> \caption{Tombe}
>>> \end{figure}
>>> \end{document} 
>>> 
>> 
>> Howdy,
>> 
>> Note: this compiles fine with pdflatex. It appears to either be a scaling problem involving xelatex and/or xdvpdfmx.
>> 
>> Good Luck,
>> 
>> Herb Schulz
>> (herbs at wideopenwest dot com)
>> 
> I can reproduce your overlap. I had something like this happen to me once. It was a corrupt jpg. So I pushed your tombe.jpg through GraphicConverter (Mac OS X) making it 1 pixel narrower and it now scales properly and does not overlap the text. I think I'm using pdflatex too.
> (whatever comes out of the box with 2014 and Auctex))
> I guess it would be interesting to discover why XeTeX thought it was corrupt, since GraphicConverter was fine with it.
> 
> Elliott Roper

I tested with a number of jpg images, a bit at random. They all scale as expected with pdftex and fail to scale for every photo with xelatex.

I use Lyn to manage photos (i.e. folder management, no editing of photos), could that be a problem?
—Gildas





More information about the XeTeX mailing list