Graphics, Figures & TablesInsert Picture from a Sub-folder

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
man2011
Posts: 43
Joined: Tue Jan 11, 2011 4:19 am

Insert Picture from a Sub-folder

Post by man2011 »

Hi All,

can I create a folder in generic folder in the tex folders?

When I usually insert a picture in my tex file, I always save the picture in the generic folder which in tex folder using the following code

Code: Select all

\begin{figure}[h!]
  \caption{Picture}
  \centering
  \includegraphics[width=0.5\textwidth]{praat}
\end{figure}
Since I have many pictures which I want to distribute them into folders in the generic folder. But I do not know what I should do in the code to insert the picture. My question is that what should I write here

Code: Select all

 \includegraphics[width=0.5\textwidth]{...}
if my picture exists in the folder called article which is in the generic folder in the work folder

Any help is really appreciated...

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Frits
Posts: 169
Joined: Wed Feb 02, 2011 6:02 pm

Insert Picture from a Sub-folder

Post by Frits »

If ALL your figures are located in a folder called 'article', put the following in your preamble:

Code: Select all

\graphicspath{{article/}}
You can call your figures like you used to:

Code: Select all

\includegraphics[width=0.5\textwidth]{praat}
Is this what you mean?
howtoTeX.com - Your LaTeX resource site (Tips, Tricks, Templates and more!)
Follow howtoTeX on twitter
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Insert Picture from a Sub-folder

Post by localghost »

The \graphicspath command is to be used with caution. For details see l2tabu.


Thorsten
Post Reply