0

Was working on mainly on 2 different pcs (ubuntu 16.04 and ubuntu 18.04). Output of pdflatex was the same for both.

When compiling the exact same file on a different laptop (freshly installed with ubuntu 19.04, texlive-full, and kile), many of the figures shrank.

Painstakingly fixed all the shrank figures, just to realize later that compiling the file on the pc they were all huge now.

Edit - The following is a minimized version of the code (which exhibits the problem):

\documentclass{report}
\usepackage{subcaption}
\usepackage{graphicx}
\begin{document}
\begin{figure}[t]%[h!]
\centering
\subcaptionbox{\label{fig:sample1}}[0.49\linewidth]{\includegraphics[width=0.9\linewidth,trim=0 1cm 0 .5cm, clip]{example-image-a.png}} 
\subcaptionbox{\label{fig:sample2}}[0.49\linewidth]{\includegraphics[width=0.9\linewidth,trim=0 1cm 0 .5cm, clip]{example-image-a.png}}
\caption{sample text}
\label{fig:sample3}
\end{figure}
\end{document}

Compiling this on the pc results with: enter image description here

Compiling on the laptop results with: enter image description here

PC Log:

This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./thesis.tex
LaTeX2e <2016/02/01>
Babel <3.9q> and hyphenation patterns for 81 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/report.cls
Document Class: report 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/caption/subcaption.sty
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption.sty
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption3.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty))))
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty))))
(./thesis.aux) (/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty)))
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
<example-image-a.png, id=1, 401.5pt x 301.125pt> <use example-image-a.png>
Overfull \hbox (141.446pt too wide) in paragraph at lines 7--7
 [][]
<use example-image-a.png>
Overfull \hbox (141.446pt too wide) in paragraph at lines 8--8
 [][]
[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map} </usr/share/texlive/texmf
-dist/tex/latex/mwe/example-image-a.png>] (./thesis.aux) )
(see the transcript file for additional information)</usr/share/texlive/texmf-d
ist/fonts/type1/public/amsfonts/cm/cmr10.pfb></usr/share/texlive/texmf-dist/fon
ts/type1/public/amsfonts/cm/cmr9.pfb>
Output written on thesis.pdf (1 page, 25985 bytes).
Transcript written on thesis.log.

PC File list:

 *File List*
  report.cls    2014/09/29 v1.4h Standard LaTeX document class
  size10.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
subcaption.sty    2016/02/20 v1.1-142 Sub-captions (AR)
 caption.sty    2016/02/21 v3.3-144 Customizing captions (AR)
caption3.sty    2016/02/04 v1.7-139 caption3 kernel (AR)
  keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
graphicx.sty    2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2016/01/03 v1.0q Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    2016/01/03 v1.10 sin cos tan (DPC)
graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live
  pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)
 ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
supp-pdf.mkii
pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
epstopdf-base.sty    2010/02/09 v2.5 Base part for package epstopdf
  grfext.sty    2010/08/19 v1.1 Manage graphics extensions (HO)
kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)
kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)
kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)
etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
example-image-a.png    Graphic file (type png)
example-image-a.png    Graphic file (type png)
 ***********

Laptop log:

    This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex)
     restricted \write18 enabled.
    entering extended mode
    (./thesis.tex
    LaTeX2e <2018-12-01>
    (/usr/share/texlive/texmf-dist/tex/latex/base/report.cls
    Document Class: report 2018/09/03 v1.4i Standard LaTeX document class
    (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
    (/usr/share/texlive/texmf-dist/tex/latex/caption/subcaption.sty
    (/usr/share/texlive/texmf-dist/tex/latex/caption/caption.sty
    (/usr/share/texlive/texmf-dist/tex/latex/caption/caption3.sty
    (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty))))
    (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
    (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
    (/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty)
    (/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
    (/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def)))
    (./thesis.aux)
    (/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
    [Loading MPS to PDF converter (version 2006.09.02).]
    ) (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
    (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
    (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty
    (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
    (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)))
    (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty
    (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
    (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty
    (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty))))
    (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
    (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty))
    (/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
    [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map} </usr/share/texlive/texmf
    -dist/tex/latex/mwe/example-image-a.png>] (./thesis.aux) )</usr/share/texlive/t
    exmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></usr/share/texlive/texmf-di
    st/fonts/type1/public/amsfonts/cm/cmr9.pfb>
    Output written on thesis.pdf (1 page, 25967 bytes).
    Transcript written on thesis.log.

Laptop file list:

 *File List*
  report.cls    2018/09/03 v1.4i Standard LaTeX document class
  size10.clo    2018/09/03 v1.4i Standard LaTeX file (size option)
subcaption.sty    2018/05/01 v1.1-162 Sub-captions (AR)
 caption.sty    2018/10/06 v3.3-154 Customizing captions (AR)
caption3.sty    2018/09/12 v1.8c caption3 kernel (AR)
  keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
graphicx.sty    2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    2016/01/03 v1.10 sin cos tan (DPC)
graphics.cfg    2016/06/04 v1.11 sample graphics configuration
  pdftex.def    2018/01/08 v1.0l Graphics/color driver for pdftex
supp-pdf.mkii
epstopdf-base.sty    2016/05/15 v2.6 Base part for package epstopdf
infwarerr.sty    2016/05/16 v1.4 Providing info/warning/error messages (HO)
  grfext.sty    2016/05/16 v1.2 Manage graphics extensions (HO)
kvdefinekeys.sty    2016/05/16 v1.4 Define keys (HO)
 ltxcmds.sty    2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
kvoptions.sty    2016/05/16 v3.12 Key value format for package options (HO)
kvsetkeys.sty    2016/05/16 v1.17 Key value parser (HO)
etexcmds.sty    2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
ifluatex.sty    2016/05/16 v1.4 Provides the ifluatex switch (HO)
pdftexcmds.sty    2018/09/10 v0.29 Utility functions of pdfTeX for LuaTeX (HO)
   ifpdf.sty    2018/09/07 v3.3 Provides the ifpdf switch
epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
example-image-a.png    Graphic file (type png)
example-image-a.png    Graphic file (type png)
 ***********

Any insight would be appreciated.

  • 3
    Minimize the document (remove all packages unrelated to the problem). Try to replace the images by example-image.png. Then show the complete document and both log-files. It the actual images are part of the problem, but them somewhere for download. – Ulrike Fischer Dec 27 '19 at 9:24
  • Working on creating a small version of the problem, thanks! – Dinari Dec 27 '19 at 9:27
  • the operating system is unlikely to be relevant, add \listfiles to your preamble and compare the list of package versions that will be printed to the log file on the two machines. – David Carlisle Dec 27 '19 at 10:32
  • The PC is running a fairly old texlive 2015, try updating that to texlive 2019. – David Carlisle Dec 27 '19 at 10:34
  • 2
    it is better to add things inline in a codeblock than use pastebin links, this question will be archived forever and you can probably not guarantee that of the links – David Carlisle Dec 27 '19 at 10:51
0

As David suggested, the problem was with wrong versions of TexLive, updating all machines to texlive 2019 solved the issue.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.