尝试插入图形文件时出错

尝试插入图形文件时出错

我想在我的 LaTeX 文档中包含一个名为 quadratic.pdf 的图形,其中仅包含下面显示的图像。

编译时出现以下错误:

Line 1: Fatal Error No output file produced 

Line 5: !LaTeX error. File: 'quadratic.pdf.sty' not found. 

我哪里做错了?

二次方程.pdf

\documentclass[oneside]{book}

\usepackage{graphicx}
\usepackage{quadratic.pdf}

\begin{document}

\chapter*{Basic Graphics}

\begin{figure}[h]
\centering
\includegraphics[width=0.5\linewidth]{quadratic}
\caption{The graphics file named \texttt{quadratic}.}
\end{figure}

\end{document}

答案1

评论太长了。

\documentclass[oneside]{book}

\usepackage{graphicx}
%\graphicspath{{./}{./SubdirOne/}{./SubdirTwo/}<... more items here ...>{./SubdirOne/SubsubdirOne/}}
\graphicspath{{./}{./SubdirOne/}{./SubdirTwo/}}

\begin{document}

\chapter*{Basic Graphics}

\begin{figure}[h]
\centering
\includegraphics[width=0.5\linewidth]{quadratic}
\caption{The graphics file named \texttt{quadratic}.}
\end{figure}

\end{document}

相关内容