On 09/18/2017 09:00 AM, Persio Barros wrote:
Hi all,
I was having some trouble when generating a pdf output with pdflatex
for a document with various figures (pdf graphic files). Some of them
showed in the generated pdf but others didn't. For those not showing,
a blank box with the correct figure size was shown instead.
After some digging, I found that the problem only happened to the
graphic files for which LyX generated a "bb" (bounding box) option for
the \includegraphics LaTeX command. That option is generated when you
change the bounding box size in the graphics-clipping pane.
Some more digging revealed that the problem is that the latest version
of pdftex-def file present in texlive-2017 and also in miktex 2.9 just
ignores the bb option, leaving a blank box, with no error message.
Previous versions of pdftex-def deferred the bb option to the viewport
option (with a warning). In that case the graphic file was included
correctly. So, this problem occurs only with updated TeX installations.
Have anybody else seen this problem?
I may have a workaround, inspired by bug #7910
(https://www.lyx.org/trac/ticket/7910), which I think is related. Rather
than using the "Clipping" tab in the graphics dialog, use the "LaTeX and
LyX options" tab, and in the "LaTeX options" field enter "viewport="
followed by the offsets from lower left for the corners of the clipping
box (same values you would have entered in the clipping dialog). I had
to commit the change, save the document, close it and reload it to get
the new settings to apply, but my test graphic appeared an seemed to
work okay.
Paul