我有(无边界框) 问题即使使用 pdflatex 引擎。这很奇怪,因为它可以与 MikTex 配合使用,但不能与 Texstudio 配合使用。遗憾的是,我现在想坚持使用 TexStudio。我已包含下面的代码以及我的 Texstudio 配置的快照。
\documentclass{report}
\usepackage{graphicx}
\begin{document}
\includegraphics{test.pdf}
\end{document}
Cannot determine size of graphic in test.pdf (no BoundingBox). \includegraphics{test.pdf}
配置快照:
日志文件:
This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9 64-bit) (preloaded format=latex 2014.2.21) 5 MAR 2014 12:42
entering extended mode
**test.tex
(U:\Thesis\Report\test\test.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, german-x-2012-05-30, greek, gujarati, hindi, hungarian, iceland
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,
lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n
german-x-2012-05-30, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman
ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm
an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl
ishmax, welsh, loaded.
("C:\Program Files\MiKTex\tex\latex\base\report.cls"
Document Class: report 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTex\tex\latex\base\size10.clo"
File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@chapter=\count80
\c@section=\count81
\c@subsection=\count82
\c@subsubsection=\count83
\c@paragraph=\count84
\c@subparagraph=\count85
\c@figure=\count86
\c@table=\count87
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
("C:\Program Files\MiKTex\tex\latex\graphics\graphicx.sty"
Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
("C:\Program Files\MiKTex\tex\latex\graphics\keyval.sty"
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
\KV@toks@=\toks14
)
("C:\Program Files\MiKTex\tex\latex\graphics\graphics.sty"
Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
("C:\Program Files\MiKTex\tex\latex\graphics\trig.sty"
Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
)
("C:\Program Files\MiKTex\tex\latex\00miktex\graphics.cfg"
File: graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive
)
Package graphics Info: Driver file: dvips.def on input line 91.
("C:\Program Files\MiKTex\tex\latex\graphics\dvips.def"
File: dvips.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
))
\Gin@req@height=\dimen103
\Gin@req@width=\dimen104
)
(U:\Thesis\Report\test\test.aux)
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
! LaTeX Error: Cannot determine size of graphic in test.pdf (no BoundingBox).
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.4 \includegraphics{test.pdf}
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
File: test.pdf Graphic file (type eps)
<test.pdf> [1
] (U:\Thesis\Report\test\test.aux) )
Here is how much of TeX's memory you used:
530 strings out of 493922
6268 string characters out of 3148909
53647 words of memory out of 3000000
3891 multiletter control sequences out of 15000+200000
3640 words of font info for 14 fonts, out of 3000000 for 9000
841 hyphenation exceptions out of 8191
25i,4n,19p,683b,142s stack positions out of 5000i,500n,10000p,200000b,50000s
Output written on test.dvi (1 page, 308 bytes).
答案1
您的配置是在显示的“构建和查看”选项中选择 dvi,因此您使用的是 latex/dvips/ps2pdf 而不是 pdflatex。您无法使用此路线包含 pdf 文件。您需要包含 EPS 文件,或者切换您的构建以使用 pdflatex。
答案2
我也遇到了同样的问题,但经过多次尝试后,我纠正了错误。最后图中所示的设置起作用了。