psfrag 或 auto-pst-pdf 返回错误:LaTeX 警告:在输入行中未找到文件“filename-pics.pdf”

psfrag 或 auto-pst-pdf 返回错误:LaTeX 警告:在输入行中未找到文件“filename-pics.pdf”

我正在使用 TeXworks 撰写论文。但是我无法将 psfrag 包与 auto-pst-pdf 一起使用,因为它返回有关我甚至没有在主命令行中调用的文件的错误。相反,第 29 行中调用了另一个文件,它是我的 uni 的 eps 徽标,它与“测试”文件位于同一目录中。我尝试了两个名称,即“Logo_Uni”和“Logo_Uni.eps”,但仍然出现相同的错误。如果我从下面的代码中注释掉 Logo,psfrag 甚至无法工作,输出 pdf 中也不会显示任何图形。

排版为pdfLaTex+MakeIndex+BibTeX,test.TeX文件如下

\documentclass[11pt,a4paper,final]{report}
\usepackage{mathtools} 
\DeclareMathOperator*{\argminA}{arg\,min}
\usepackage{cite}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{psfrag}
\usepackage{auto-pst-pdf}
\usepackage{amssymb}
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
\usepackage{epsf}
  \usepackage{color}
  \usepackage{rotating}
  \usepackage{trfsigns}
    \usepackage{graphicx,psfrag,amssymb}
    \usepackage[dvips]{epsfig}
\usepackage{helvet}
\usepackage{caption}


\begin{document}

{\begin{figure}
\begin{center}
\includegraphics{Logo_Uni}
\end{center}
\end{figure}}


\psfragfig{PL_newTag}{
\psfrag{Sigma}{$\sigma_{SS,k}^2$}
}

\end{document}
Console Output:

LaTeX Warning: File `test-pics.pdf' not found on input line 29.


! Package pdftex.def Error: File `test-pics.pdf' not found: using draft setting
.

See the pdftex.def package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.29 \includegraphics{Logo_Uni}

? 

2019-02-02 22:42:38,630+0500 INFO  pdflatex - finishing with exit code 1
2019-02-02 22:42:39,458+0500 INFO  pdflatex - starting with command line: pdflatex --synctex=1 --shell-escape C:/Users/mwx416012/Desktop/psfrag_testing\test.tex
2019-02-02 22:42:39,466+0500 INFO  pdflatex - allowing known shell commands
2019-02-02 22:42:39,467+0500 INFO  pdflatex - enabling input (output) from (to) processes
2019-02-02 22:42:39,467+0500 INFO  pdflatex - allowing all shell commands
2019-02-02 22:42:39,776+0500 INFO  pdflatex - executing write18 shell command: echo " "
2019-02-02 22:42:39,824+0500 INFO  pdflatex - executing write18 shell command: echo "-------------------------------------------------"
2019-02-02 22:42:39,853+0500 INFO  pdflatex - executing write18 shell command: echo "auto-pst-pdf: Auxiliary LaTeX compilation"
2019-02-02 22:42:39,882+0500 INFO  pdflatex - executing write18 shell command: echo "-------------------------------------------------"
2019-02-02 22:42:40,010+0500 INFO  pdflatex - executing write18 shell command: latex -disable-write18 -jobname="test-autopp" -interaction=batchmode  "\let \APPmakepictures \empty \input  test.tex"
2019-02-02 22:42:41,363+0500 INFO  pdflatex - executing write18 shell command: dvips -Ppdf -o "test-autopp.ps" "test-autopp.dvi"
2019-02-02 22:42:41,942+0500 INFO  pdflatex - executing write18 shell command: ps2pdf  "test-autopp.ps" "test-autopp.pdf"
2019-02-02 22:42:42,985+0500 INFO  pdflatex - executing write18 shell command: pdfcrop  "test-autopp.pdf" "test-pics.pdf"
2019-02-02 22:42:43,325+0500 INFO  pdflatex - executing write18 shell command: echo "-------------------------------------------------"
2019-02-02 22:42:43,368+0500 INFO  pdflatex - executing write18 shell command: echo "auto-pst-pdf: End auxiliary LaTeX compilation"
2019-02-02 22:42:43,395+0500 INFO  pdflatex - executing write18 shell command: echo "-------------------------------------------------"
@KJO

2019-02-02 22:56:41,219+0500 INFO  pdflatex - starting with command line: pdflatex --synctex=1 --shell-escape C:/Users/mwx416012/Desktop\Hallo.tex
2019-02-02 22:56:41,224+0500 INFO  pdflatex - allowing known shell commands
2019-02-02 22:56:41,224+0500 INFO  pdflatex - enabling input (output) from (to) processes
2019-02-02 22:56:41,224+0500 INFO  pdflatex - allowing all shell commands
2019-02-02 22:56:41,413+0500 INFO  pdflatex - executing write18 shell command: echo "hallo"
2019-02-02 22:56:41,604+0500 INFO  pdflatex - finishing with exit code 0
2019-02-02 22:56:41,893+0500 INFO  pdflatex - starting with command line: pdflatex --synctex=1 --shell-escape C:/Users/mwx416012/Desktop\Hallo.tex
2019-02-02 22:56:41,895+0500 INFO  pdflatex - allowing known shell commands
2019-02-02 22:56:41,895+0500 INFO  pdflatex - enabling input (output) from (to) processes
2019-02-02 22:56:41,895+0500 INFO  pdflatex - allowing all shell commands
2019-02-02 22:56:41,987+0500 INFO  pdflatex - executing write18 shell command: echo "hallo"
2019-02-02 22:56:42,175+0500 INFO  pdflatex - finishing with exit code 0

答案1

LaTeX 警告:输入行中未找到文件“TeXfilename-pics.pdf”

表明和/或都perl无法ghostscript执行临时文件TeXfilename-pics

我们确定在这种情况下 shell 转义正常运行,因此剩下的问题就是您的路径在哪里perlghostscript

要检查它们是否已安装,请运行 Windows 命令控制台并输入

perl --version

如果它响应版本,则一切正常(否则安装它)还要检查

gswin32c --version

如果它响应版本,则一切正常(否则安装它)

一旦它们在你的路径上正确就位,任何其他警告都不应该来自这两个原因

相关内容