简单的.tex 文件无法使用终端进行编译

简单的.tex 文件无法使用终端进行编译

我使用的是 Mac,并尝试使用终端编译 .tex 文件(据我所知,它的工作方式应该与在 Linux 中相同)。但是,我一直试图将图片包含到我的代码中,但终端始终无法编译文档。

这是.tex 文件的代码:

\documentclass[12pt]{article}

\usepackage{graphicx}

\begin{document}

Test

\begin{figure}[h]
\centering
\includegraphics{setup}
\caption{System set-up}
\label{fig:setup}
\end{figure}

\end{document}

这是我在终端中使用的命令:

latex paper.tex
latex paper.tex
dvips paper.dvi -o paper.ps
ps2pdf paper.ps
open paper.pdf

这就是我得到的:

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)
 restricted \write18 enabled.
entering extended mode
(./paper.tex
LaTeX2e <2011/06/27>
Babel <3.9f> and hyphenation patterns for 78 languages loaded.
(/usr/local/texlive/2013/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2013/texmf-dist/tex/latex/base/size12.clo))
(/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/local/texlive/2013/texmf-dist/tex/latex/latexconfig/graphics.cfg)
(/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/dvips.def)))
(./paper.aux)! Unable to read an entire line---bufsize=200000.
Please increase buf_size in texmf.cnf.

我不明白为什么它可以在 TeXShop 上运行,却不能在终端上运行。此外,如果我删除includegraphics.tex 文件中的代码行,则可以使用终端正确编译该文件。发生了什么?

我将非常感谢您的帮助,谢谢。

相关内容