graphicx 中的键存在问题:程序包 keyval 错误:未指定值

graphicx 中的键存在问题:程序包 keyval 错误:未指定值

我从 texlive 2016 移至 texlive 2020。类似这样的事情: \includegraphics[quiet,scale=0.5]{OIP} 之前可以正常工作,但出现错误: Package keyval Error: No value specified for quiet

我正在使用 catalina 下的 iMac 并使用最新版本的 macTeX 软件包。

我用来测试的代码是

\documentclass[12pt]{article}
\usepackage{graphicx} \begin{document}
\includegraphics[quiet,scale=0.5]{OIP}
\end{document}

其中“OIP”是您想要的 pdf 中的任何图像。我得到的完整日志如下:

** Log**
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdflatex 2020.12.5)  5 DEC 2020 14:25
entering extended mode
 \write18 enabled.
 file:line:error style messages enabled.
 %&-line parsing enabled.
**test_quiet.tex
(./test_quiet.tex
LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-03-06>
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/article.cls
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/size12.clo
File: size12.clo 2019/12/20 v1.4l Standard LaTeX file (size option)
)
\c@part=\count167
\c@section=\count168
\c@subsection=\count169
\c@subsubsection=\count170
\c@paragraph=\count171
\c@subparagraph=\count172
\c@figure=\count173
\c@table=\count174
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen134
)
(/usr/local/texlive/2020/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2019/11/30 v1.2a Enhanced LaTeX Graphics (DPC,SPQR)

(/usr/local/texlive/2020/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks15
)
(/usr/local/texlive/2020/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2019/11/30 v1.4a Standard LaTeX Graphics (DPC,SPQR)

(/usr/local/texlive/2020/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
(/usr/local/texlive/2020/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 105.

(/usr/local/texlive/2020/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2018/01/08 v1.0l Graphics/color driver for pdftex
))
\Gin@req@height=\dimen135
\Gin@req@width=\dimen136
)
(/usr/local/texlive/2020/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def
File: l3backend-pdfmode.def 2020-03-12 L3 backend support: PDF mode
\l__kernel_color_stack_int=\count175
\l__pdf_internal_box=\box45
)
(./test_quiet.aux)
\openout1 = `test_quiet.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 12.
LaTeX Font Info:    ... okay on input line 12.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 12.
LaTeX Font Info:    ... okay on input line 12.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 12.
LaTeX Font Info:    ... okay on input line 12.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 12.
LaTeX Font Info:    ... okay on input line 12.
LaTeX Font Info:    Checking defaults for TS1/cmr/m/n on input line 12.
LaTeX Font Info:    ... okay on input line 12.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 12.
LaTeX Font Info:    ... okay on input line 12.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 12.
LaTeX Font Info:    ... okay on input line 12.

(/usr/local/texlive/2020/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count176
\scratchdimen=\dimen137
\scratchbox=\box46
\nofMPsegments=\count177
\nofMParguments=\count178
\everyMPshowfont=\toks16
\MPscratchCnt=\count179
\MPscratchDim=\dimen138
\MPnumerator=\count180
\makeMPintoPDFobject=\count181
\everyMPtoPDFconversion=\toks17
) (/usr/local/texlive/2020/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/2020/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
))

./test_quiet.tex:14: Package keyval Error: No value specified for quiet.

See the keyval package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.14 \includegraphics[quiet,scale=0.5]{OIP}
                                           
? q
OK, entering \batchmode...
<OIP.pdf, id=1, 597.23125pt x 845.1575pt>
File: OIP.pdf Graphic file (type pdf)
<use OIP.pdf>
Package pdftex.def Info: OIP.pdf  used on input line 14.
(pdftex.def)             Requested size: 298.61488pt x 422.57771pt.
 [1

{/usr/local/texlive/2020/texmf-var/fonts/map/pdftex/updmap/pdftex.map} <./OIP.p
df>] (./test_quiet.aux) ) 
Here is how much of TeX's memory you used:
 1133 strings out of 480608
 16881 string characters out of 5903630
 250421 words of memory out of 5000000
 17073 multiletter control sequences out of 15000+600000
 532636 words of font info for 25 fonts, out of 8000000 for 9000
 1141 hyphenation exceptions out of 8191
 30i,5n,25p,187b,111s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/local/texlive/2020/texmf-dist/fonts/type1/public
/amsfonts/cm/cmr12.pfb>
Output written on test_quiet.pdf (1 page, 29441 bytes).
PDF statistics:
 19 PDF objects out of 1000 (max. 8388607)
 11 compressed objects within 1 object stream
 0 named destinations out of 1000 (max. 500000)
 6 words of extra memory for PDF output out of 10000 (max. 10000000)

答案1

我不知道是什么导致了这种行为的改变,但以下内容提供了一个临时的解决方案:

\documentclass[12pt]{article}

\usepackage[]{graphicx}

\makeatletter
\providecommand\KV@Gin@quiet@default{\KV@Gin@quiet{}}
\makeatother

\begin{document}
\includegraphics[quiet,scale=.5]{example-image-duck}
\end{document}

相关内容