当我尝试使用SIAM 模板(siamart220329).直接用pdfLaTeX编译时报错:
“包 pdftex.def:未找到文件‘lexample_fig1-eps-converted-to.pdf’:使用草稿设置。\n”
我在 Google 上搜索,发现epstopdf
可能是原因,texlive-fonts-utils
可能会解决我的问题。然而,在几个计算机系统上只有安装它的教程
除了 Windows。
一个简单的例子:
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics{lexample_fig1}
\end{document}
texworks 给出的错误是
**!!! Error: Input filename 'lexample_fig1.eps' not allowed in**
**restricted mode.** C:\texlive\2023\bin\windows\runscript.tlu:921:
command failed with exit code 2: perl.exe
c:\texlive\2023\texmf-dist\scripts\epstopdf\epstopdf.pl --restricted
"--outfile=lexample_fig1-eps-converted-to.pdf" "lexample_fig1.eps"
**! Package pdftex.def Error: File `lexample_fig1-eps-converted-to.pdf'**
**not found : using draft setting.**
See the pdftex.def package documentation for explanation. Type H
<return> for immediate help. ...
l.6 \includegraphics{lexample_fig1}
?
完整.log
文档显示:
This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdflatex 2023.4.24) 19 DEC 2023 10:23
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**test.tex
(./test.tex
LaTeX2e <2022-11-01> patch level 1
L3 programming layer <2023-02-22>
(c:/texlive/2023/texmf-dist/tex/latex/base/article.cls
Document Class: article 2022/07/02 v1.4n Standard LaTeX document class
(c:/texlive/2023/texmf-dist/tex/latex/base/size10.clo
File: size10.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
)
(c:/texlive/2023/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2021/09/16 v1.2d Enhanced LaTeX Graphics (DPC,SPQR)
(c:/texlive/2023/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2022/05/29 v1.15 key=value parser (DPC)
\KV@toks@=\toks16
)
(c:/texlive/2023/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2022/03/10 v1.4e Standard LaTeX Graphics (DPC,SPQR)
(c:/texlive/2023/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2021/08/11 v1.11 sin cos tan (DPC)
)
(c:/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.
(c:/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
)
(c:/texlive/2023/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
File: l3backend-pdftex.def 2023-01-16 L3 backend support: PDF output (pdfTeX)
\l__color_backend_stack_int=\count193
\l__pdf_internal_box=\box51
)
No file test.aux.
\openout1 = `test.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
(c:/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
) (c:/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.
(c:/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
))
Package epstopdf Info: Source file: <lexample_fig1.eps>
(epstopdf) date: 2023-12-19 10:06:38
(epstopdf) size: 312532 bytes
(epstopdf) Output file: <lexample_fig1-eps-converted-to.pdf>
(epstopdf) Command: <repstopdf --outfile=lexample_fig1-eps-converte
d-to.pdf lexample_fig1.eps>
(epstopdf) \includegraphics on input line 6.
runsystem(repstopdf --outfile=lexample_fig1-eps-converted-to.pdf lexample_fig1.
eps)...executed safely (allowed).
Package epstopdf Info: Result file: <lexample_fig1-eps-converted-to.pdf>.
! Package pdftex.def Error: File `lexample_fig1-eps-converted-to.pdf' not found
: using draft setting.
See the pdftex.def package documentation for explanation.
Type H <return> for immediate help.
...
l.6 \includegraphics{lexample_fig1}
? shell escape commands
OK, entering \scrollmode...
[1
{c:/texlive/2023/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./test.aux) )
Here is how much of TeX's memory you used:
1314 strings out of 476025
21714 string characters out of 5794015
1849382 words of memory out of 5000000
21803 multiletter control sequences out of 15000+600000
512455 words of font info for 33 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
57i,5n,62p,197b,132s stack positions out of 10000i,1000n,20000p,200000b,200000s
<
c:/texlive/2023/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb><c:/texlive
/2023/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb>
Output written on test.pdf (1 page, 21567 bytes).
PDF statistics:
18 PDF objects out of 1000 (max. 8388607)
10 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)
更新:找到texmf-dist\scripts\epstopdf\epstopdf.pl
并更改$ restricted = 1 if $ :: opt_restricted
为$ restricted = 0 if $ :: opt_restricted
可能是一个解决方案。此时,lexample_fig1-eps-converted-to.pdf
根文件夹中将有一个名为 的文件。我担心这种更改的危险性。