
을 사용하여 논문을 작성하고 있습니다 . 저는 그림 작성과 그림 그리기를 전환하는 것이 다소 귀찮습니다 . 그래서 방해를 피하기 위해 글을 쓸 때 생성하고 나중에 그림을 다시 추가하고 texlive2013
싶습니다. 좋은 해결책을 찾았습니다.dummy figure
여기:
그런데 없어진 피규어들 뿐만 아니라 다른 일반 피규어들도 교체되었습니다. 복구할 수 있는 방법이 없을까요?
답변1
작은 해결 방법이지만 완벽하지는 않습니다(그래픽 확장에 따라 실패할 수 있음). \IfFileExists
약간 재정의된 \includegraphics
명령에 사용합니다. 4개의 확장명(모두 소문자)( .eps
, .pdf
, .jpg
및 .png
) 을 테스트합니다.
\documentclass{scrbook}
\usepackage{blindtext}
\usepackage{graphicx}
\usepackage{tcolorbox}
\let\StandardIncludeGraphics\includegraphics%
\renewcommand{\includegraphics}[2][]{%
\IfFileExists{#2.eps}{%
\StandardIncludeGraphics[#1]{#2}%
}{%
\IfFileExists{#2.pdf}{%
\StandardIncludeGraphics[#1]{#2}%
}{ % No, no .pdf, try *.jpg
\IfFileExists{#2.jpg}{%
\StandardIncludeGraphics[#1]{#2}%
}{
\IfFileExists{#2.png}{%
\StandardIncludeGraphics[#1]{#2}%
}{%
\begin{tcolorbox}[width=6cm,height=4cm,arc=0mm,auto outer arc]
\end{tcolorbox}
}
}
}
}%
%
}% End of command
\begin{document}
\chapter{First one}
\blindtext
\begin{figure}
\begin{center}
\includegraphics[width=10cm,height=8cm]{some_file}
\caption{My demo figure}
\end{center}
\end{figure}
\blindtext[2]
\end{document}
언급된 파일이 some_file
내 경로에 전혀 존재하지 않습니다.