[LyX/2.3.x] Fix bug #11180
Scott Kostyshak
skostysh at lyx.org
Fri Sep 25 14:26:22 UTC 2020
On Fri, Sep 25, 2020 at 12:08:34PM +0200, Enrico Forestieri wrote:
> On Fri, Sep 25, 2020 at 01:06:03AM -0400, Scott Kostyshak wrote:
> > On Thu, Oct 04, 2018 at 06:48:12AM +0200, Richard Kimberly Heck wrote:
> > > commit ea81faa911fc2561a017eb36c3a3d0bbe5b86756
> > > Author: Enrico Forestieri <forenr at lyx.org>
> > > Date: Sun Jun 24 20:06:40 2018 +0200
> > >
> > > Fix bug #11180
> > >
> > > When a raster image with an advertised pixel density different
> > > from 72 dpi is included in a latex file, the output image dimensions
> > > are scaled by the ratio 72/pixel_density. Hence, if a clipping
> > > bounding box is specified, it has to be scaled by the same ratio,
> > > otherwise the images will be clipped differently on screen and output.
> > > Here we use the extractbb command (present in any TeX distribution)
> > > to ask about the output dimensions of the image as dictated by the
> > > pixel density and compute the scaling ratio by the knowledge of the
> > > actual dimensions. If, for whatever reason, extractbb is not found,
> > > everything goes as before, because the clipping bounding box will
> > > simply not be corrected.
> > >
> > > (cherry picked from commit 380f34a11485c41d812695dc4279b24a5ed5cc07)
> > > ---
> >
> > A bisect on 2.3.x lead me here. I see the same behavior on master. To
> > reproduce, download the attached files and open the .lyx file and view
> > as PDF (pdflatex). The image is clipped differently than before this
> > commit. Strangely, if I export on the command line (with -e pdf2),
> > things work as before.
>
> I think it was an oversight. The clipping bounding box should not be
> corrected for all vector formats, not only postscript. Fixed at 9b1763cd.
> Riki, this is also needed in stable.
Thanks for the quick fix, Enrico. Tested and works well.
There is still a mystery (to me) of why I got different PDF output if I
opened the .lyx file in the GUI and clicked on the View button, as
opposed to exporting on the command line. On the command line export, it
seems that it did not clip the bounding box? (I did not check this, but
I can't think of another explanation). This makes me wonder if we now
tried to include a graphic that does need clipping whether or not it
would clip the bounding box when the .lyx file is exported on the
command line.
Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200925/7989ca68/attachment.asc>
More information about the lyx-devel
mailing list