Graphics, Figures & Tablesfile locations

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
jhapk
Posts: 81
Joined: Tue Apr 20, 2010 9:33 pm

file locations

Post by jhapk »

Hi,

I have a number of folders in which my figures are located. For e.g.
./chapter_1/figures/
./chapter_2/figures/
...
./chapter_n/figures/
To deal with this, in my preamble I declare

Code: Select all

\usepackage{graphicx}                 
\graphicspath{{chapter_1/figures/} 
{chapter_2/figures/}{chapter_3/figures/}chapter_4/figures/}
{chapter_5/figures/}} 
And then every time I need to insert a picture, all I do it

Code: Select all

\includegraphics[filename.eps]
and I don't have to give the exact location.
Can I do something with my tikz images? I have some files (say tikzfile.tex) which have script for tikz diagrams which begin and end with

Code: Select all

\begin{tikzpicture}
CODE for figure
\end{tikzpicture}
so to insert the tikz image in my main tex file, I do something like

Code: Select all

\begin{figure}
\input{chapter_1/latex_figures/tikzfile.tex} 
\end{figure}
How can I avoid typing this chapter_1/latex_figure again and again? Is there any more smarter way of including tikz images?

Thanks

Recommended reading 2024:

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

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

Post Reply