
파일 이름을 잘못 입력하는 등 실수로 존재하지 않는 파일을 포함하면 오류나 경고 없이 'colophon2.tex 파일이 없습니다.'라는 메시지만 표시되면서 컴파일이 계속됩니다. 이는 \includegraphics 및 \includepdf가 아닌 tex 파일을 \include-ing할 때만 발생합니다. 설상가상으로 이 메시지는 흥미롭거나 중요하지 않은 다른 많은 컴파일 메시지 중에서 손실됩니다.
이러한 경우 오류가 발생하여 컴파일을 강제로 중지하거나 적어도 뭔가 빠졌음을 좀 더 눈에 띄게 경고하려면 어떻게 해야 합니까?
저는 Macbook Pro, OS X 10.6.8을 사용하고 있으며 Sublime Text, Texshop, TexMaker, TexWorks 및 제가 찾을 수 있는 다른 모든 Tex IDE에서 이것을 시도했습니다. 그들 모두는 같은 문제를 가지고 있습니다.
pdflatex 버전은 다음과 같습니다:
pdflatex -v
pdfTeX 3.1415926-2.3-1.40.12 (TeX Live 2011)
kpathsea version 6.0.1
Copyright 2011 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty. Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.5.2; using libpng 1.5.2
Compiled with zlib 1.2.5; using zlib 1.2.5
Compiled with xpdf version 3.02pl5
미리 감사드립니다!
답변1
타이핑을 변경하려면
No file no-file-like-this.tex.
오류에
! LaTeX Error: File `no-file-like-this.tex' not found.
누락된 파일을 허용하는 대신 \include
일반 파일을 사용하도록 패치할 수 있습니다 .\input
\documentclass{article}
\usepackage{etoolbox}
\makeatletter
\patchcmd\@include\@input@\input{}{}
\makeatother
\begin{document}
\include{no-file-like-this}
\end{document}