0

The figure (p201.png) is on my desktop and I did simply as follows:

\documentclass{article}
\usepackage{graphicx}
\graphicspath{/Users/prinelo/Desktop}
\begin{document}
    content...
    \includegraphics[width=0.5\textwidth]{p201.png}
\end{document}

What have I done wrong?

  • You need a backslash after Desktop/. – Jānis Lazovskis Dec 04 '17 at 04:51
  • 1
    @JānisLazovskis No backslash! You show a slash. See also https://tex.stackexchange.com/questions/139401/how-to-use-graphicspath – TeXnician Dec 04 '17 at 05:59
  • @HeikoOberdiek According to your instruction, it works in this sample, but when the same condition applied to my book, it does not manifest the figure but instead of a figure in which it shows exactly the name of the whole path, i.e., "/Users/prinelo/Desktop/p201.png". – King Chung Lo Dec 04 '17 at 06:52
  • @TeXnician it requires a slash (not backslash of course) after the final directory and double curly braces. However, now it works for this sample file, but when the same condition applied to my book, it does not manifest the figure but instead of a figure in which it shows exactly the name of the whole path, i.e., "/Users/prinelo/Desktop/p201.png". – King Chung Lo Dec 04 '17 at 07:02
  • 1
    @KingChungLo Likely, the book uses option draft as global option (\documentclass) or package option. – Heiko Oberdiek Dec 04 '17 at 08:04
  • @HeikoOberdiek Oh, i c. After deleting draft, it works now. Thanks! – King Chung Lo Dec 04 '17 at 08:15

0 Answers0