在两台机器上使用 pdflatex 时输出不同

在两台机器上使用 pdflatex 时输出不同

主要在 2 台不同的电脑(ubuntu 16.04 和 ubuntu 18.04)上工作。pdflatex 的输出对两者来说都相同。

在另一台笔记本电脑(新安装了 ubuntu 19.04、texlive-full 和 kile)上编译完全相同的文件时,许多数字都缩小了。

煞费苦心地修复了所有缩小的数字,后来才意识到在电脑上编译文件时它们现在都变得很大。

编辑-以下是代码的最小化版本(展示了问题):

\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}

在 PC 上编译结果如下: 在此处输入图片描述

在笔记本电脑上编译结果如下: 在此处输入图片描述

PC 日志:

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*
  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)
 ***********

笔记本电脑日志:

    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.

笔记本电脑文件列表:

 *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)
 ***********

任何见解都将不胜感激。

答案1

正如 David 所说,问题出在错误版本的 TexLive,将所有机器更新到 texlive 2019 可以解决问题。

相关内容