I am trying to insert some ready image-pdf files to my LaTeX code but failed.
My code is
\documentclass[a4paper,12pt]{book}
\usepackage{graphicx}
\graphicspath{{/Cathay/Desktop/build/Cathay1/}{C:\Users}}
\begin{figure}
\centering
\includegraphics[height=5cm]{Cathay1.pdf}
\caption{text}
\end{figure}
\end{document}
The pic didn't show up after I put this code. Instead, the text follows this code just disappeared.
Could anyone tell me the right code for inserting this pdf?
Best Answer
\graphicspath{}
, you must use slash (/
) instead of backslash (\
) to list directories. In your case,\graphicspath{{/Cathay/Desktop/build/Cathay1/}{C:/Users/}}
is right.\begin{document}
command.