我在两台运行 macOS Monterey 的电脑上安装了 MacTeX-2023,所有软件包均已更新(使用 Tex Live)。我在两台电脑上都使用 TeXShop(版本 5.12)。每当我在文档中包含图形时,我都无法在其中一台电脑上进行编译(见下面的示例)。在第二台电脑上(对同一文档进行)编译(使用同一图形)可以完美运行。有人能告诉我问题出在哪里吗?
这是我的代码:
\documentclass[12pt]{article}
\usepackage{graphicx}
\begin{document}
This is a test.
\includegraphics[width=\textwidth]{TestFig.pdf}
\end{document}
TestFig.pdf 文件位于同一文件夹中。
\includegraphics
如果我从代码中注释掉该命令,我可以生成一个 .pdf 文件,但其他情况则不行。
这是编译失败的 .log 文件:
This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdflatex 2023.4.5) 5 APR 2023 11:54
entering extended mode
restricted \write18 enabled.
file:line:error style messages enabled.
%&-line parsing enabled.
**Test.tex
(./Test.tex
LaTeX2e <2022-11-01> patch level 1
L3 programming layer <2023-03-30>
(/usr/local/texlive/2023/texmf-dist/tex/latex/base/article.cls
Document Class: article 2022/07/02 v1.4n Standard LaTeX document class
(/usr/local/texlive/2023/texmf-dist/tex/latex/base/size12.clo
File: size12.clo 2022/07/02 v1.4n Standard LaTeX file (size option)
)
\c@part=\count185
\c@section=\count186
\c@subsection=\count187
\c@subsubsection=\count188
\c@paragraph=\count189
\c@subparagraph=\count190
\c@figure=\count191
\c@table=\count192
\abovecaptionskip=\skip48
\belowcaptionskip=\skip49
\bibindent=\dimen140
)
(/usr/local/texlive/2023/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2021/09/16 v1.2d Enhanced LaTeX Graphics (DPC,SPQR)
(/usr/local/texlive/2023/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2022/05/29 v1.15 key=value parser (DPC)
\KV@toks@=\toks16
)
(/usr/local/texlive/2023/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2022/03/10 v1.4e Standard LaTeX Graphics (DPC,SPQR)
(/usr/local/texlive/2023/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2021/08/11 v1.11 sin cos tan (DPC)
)
(/usr/local/texlive/2023/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 107.
(/usr/local/texlive/2023/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2022/09/22 v1.2b Graphics/color driver for pdftex
))
\Gin@req@height=\dimen141
\Gin@req@width=\dimen142
)
(/usr/local/texlive/2023/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
File: l3backend-pdftex.def 2023-03-30 L3 backend support: PDF output (pdfTeX)
\l__color_backend_stack_int=\count193
\l__pdf_internal_box=\box51
)
(./Test.aux)
\openout1 = `Test.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
(/usr/local/texlive/2023/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count194
\scratchdimen=\dimen143
\scratchbox=\box52
\nofMPsegments=\count195
\nofMParguments=\count196
\everyMPshowfont=\toks17
\MPscratchCnt=\count197
\MPscratchDim=\dimen144
\MPnumerator=\count198
\makeMPintoPDFobject=\count199
\everyMPtoPDFconversion=\toks18
) (/usr/local/texlive/2023/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
Package: epstopdf-base 2020-01-24 v2.11 Base part for package epstopdf
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
85.
(/usr/local/texlive/2023/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
e
))
!pdfTeX error: /Library/TeX/texbin/pdflatex (file ./TestFig.pdf): reading image
file failed
==> Fatal error occurred, no output PDF file produced!
我阅读了相关帖子,并尝试删除所有辅助文件、关闭所有 .pdf 文件、更改默认 .pdf 查看器(Preview/Acrobat)、重新启动......,但我总是得到相同的结果。