编译时出现问题:!LaTeX 错误:未找到文件“./fig/Q_a_x”

编译时出现问题:!LaTeX 错误:未找到文件“./fig/Q_a_x”

文件夹fig与文件位于同一目录中.tex,图形Q_a_x.eps位于文件夹内fig。当我在 Linux 中使用 进行编译时,会发生此问题pdflatex。有什么方法可以解决这个问题,但继续使用pdflatex而不是进行编译latex?提前致谢!

文件的位置如下所示: 在此处输入图片描述

该图在 tex 文件中包含如下内容:

    \begin{figure}[h]
  \centering
\includegraphics[width=3.4in]{./fig/Q_a_x.eps}
\caption{$Q^{GW}(a_*,x)$ as a function of x for different $a_*$'s.}
\label{figQ-a-x}
\end{figure}

以下是 pdflatex 编译的输出:

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)
 restricted \write18 enabled.
entering extended mode
(./kerr.tex
LaTeX2e <2011/06/27>
Babel <3.9h> and hyphenation patterns for 78 languages loaded.
(/usr/share/texlive/texmf-dist/tex/latex/revtex4/revtex4.cls
Document Class: revtex4 2001/08/02 v4.0 (http://publish.aps.org/revtex4/
for documentation)
ltxutil: portions licensed from W. E. Baxter ([email protected])
ltxgrid: portions licensed from W. E. Baxter ([email protected])
(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty)
(/usr/share/texlive/texmf-dist/tex/latex/natbib/natbib.sty)
(/usr/share/texlive/texmf-dist/tex/latex/revtex4/revsymb.sty))
(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amsfonts.sty)
(/usr/share/texlive/texmf-dist/tex/latex/revtex4/aps.rtx)
(/usr/share/texlive/texmf-dist/tex/latex/revtex4/10pt.rtx)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty)
(/etc/texmf/tex/latex/config/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))))
(/usr/share/texlive/texmf-dist/tex/latex/graphics/epsfig.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/color.sty
(/etc/texmf/tex/latex/config/color.cfg))
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty))
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/auxhook.sty)
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg))

Package hyperref Message: Driver (autodetected): hpdftex.

(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
(/usr/share/texlive/texmf-dist/tex/generic/ulem/ulem.sty)
(/usr/share/texmf/tex/latex/xcolor/xcolor.sty
(/etc/texmf/tex/latex/config/color.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/dvipsnam.def))
(/usr/share/texlive/texmf-dist/tex/latex/subfig/subfig.sty
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption.sty
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption3.sty)

Package caption Warning: Unsupported document class (or package) detected,
(caption)                usage of the caption package is not recommended.
See the caption package documentation for explanation.

)) (/usr/share/texlive/texmf-dist/tex/latex/tools/tabularx.sty
(/usr/share/texlive/texmf-dist/tex/latex/tools/array.sty)) (./kerr.aux)
(/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
)

Package hyperref Warning: Height of page (\paperheight) is invalid (0.0pt),
(hyperref)                using 11in.

(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
(./kerr.out) (./kerr.out)

Package caption Warning: \caption will not be redefined since it's already
(caption)                redefined by a document class or package which is
(caption)                unknown to the caption package.
See the caption package documentation for explanation.

(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsa.fd)
(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsb.fd)

LaTeX Warning: Reference `conclusions' on page 1 undefined on input line 74.

[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
Overfull \hbox (5.00699pt too wide) in alignment at lines 86--89
 [][][] []

LaTeX Warning: Reference `appendix:spin' on page 2 undefined on input
line 93.


Underfull \hbox (badness 4013) in paragraph at lines 93--95
[]\OT1/cmr/m/n/10 The above an-gu-lar equa-tion is the well-known

LaTeX Warning: Reference `appendix:spin' on page 2 undefined on input
line 112.



Package hyperref Warning: Ignoring empty anchor on input line 114.


LaTeX Warning: Reference `appendix:setup' on page 2 undefined on input
line 120
.

[2]
Underfull \hbox (badness 10000) in paragraph at lines 126--128
[]\OT1/cmr/m/n/10 We first de-fine a di-men-sion-less quan-tity

Underfull \hbox (badness 1142) in paragraph at lines 126--128
\OML/cmm/m/it/10 Q[]\OT1/cmr/m/n/10 (\OML/cmm/m/it/10 a[];
M!\OT1/cmr/m/n/10 )$
, which rep-re-sents the ex-pected emis-

Overfull \hbox (8.801pt too wide) in alignment at lines 128--132
 [][][] []

! LaTeX Error: File `./fig/Q_a_x' not found.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

我的 tex 文件的序言在这里:

\documentclass[prd, amsfonts, twocolumn, nofootinbib, showpacs]{revtex4}
\usepackage{graphicx, epsfig}
\usepackage{color}
\usepackage{amsmath}
\usepackage{hyperref}
\lower0.6ex\hbox{$\sim$}}}
\newcommand{\lapp}{\mathrel{\raise.3ex\hbox{$<$}\mkern-14mu \lower0.6ex\hbox{$\sim$}}}
\def\bbox{{\,\lower0.9pt\vbox{\hrule \hbox{\vrule height 0.2 cm
\hskip 0.2 cm \vrule  height 0.2 cm}\hrule}\,}}

\makeatletter
\makeatother

%%%%%%%%%%%%%%%%%%%%% EDITING MARKUP %%%%%%%%%%%%%%%%%%
\usepackage{color}
\usepackage{ulem}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{subfig}
\usepackage{tabularx}

答案1

pdflatex接受(几乎)除 之外的所有图像文件.eps。尝试将其转换为.pdf.png任何方便的格式。

否则,您可以使用epstopdf包,它会自动为您完成工作。在这种情况下,您应该添加\epstopdfsetup{outdir=./fig/},以告诉它将生成的.pdf文件放在哪里。

相关内容