Graphics, Figures & TablesCurrent File Directory and Path for Graphics Files

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
BinaryBen
Posts: 15
Joined: Mon Feb 18, 2013 8:54 pm

Current File Directory and Path for Graphics Files

Post by BinaryBen »

Hi all,

I've got a "main.tex", and several .tex files in sub-folders, which I'm including using \input.

Code: Select all

main.tex
  \ch01\sub.tex
  \ch02\sub.tex
  \ch03\sub.tex
  ...
I include the currfile package in "main.tex". In each "sub.tex" I want it to use that relative folder and sub-folder like this.

Code: Select all

/graphicspath{{\currfiledir/figures/}}
instead of doing this:

Code: Select all

\graphicspath{{ch03/figures/}}
However, \currfiledir won't work here. Any ideas why?

Thanks

Bob
Last edited by localghost on Fri Mar 08, 2013 6:40 pm, edited 1 time in total.

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Current File Directory and Path for Graphics Files

Post by cgnieder »

Can you please compose a minimal (non) working example that illustrates your problem? It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.

Regards
site moderator & package author
Post Reply