GeneralReference Path

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Geronnimo
Posts: 1
Joined: Mon Oct 03, 2011 10:11 am

Reference Path

Post by Geronnimo »

Dear Members of the Latex Community,

I'm running into a problem, obvious and quite stupid but I can't get out.
When I'm compiling a latex file, I set it up in a main directory or map, with different submaps for several chapters (to keep the clutter away in my main map).
I make reference to different submaps for graphics etc. by using /includegraphics{Submap/imagename}. This all works fine. But what if I want to refer to a map like "my pictures", which is not in the main map, how do I do that?
I've tried things like \includegraphics{C://User/MyDocuments/MyPictures/Mapname/filename} but that doesn't seem to work at all.

I use the example with an 'includegraphics' but tend to use the same principle in the \subfile package. Anyone experience in the relation of my problem with the specific package?

Many thanks in advance!

Geronnimo

Recommended reading 2024:

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

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

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Reference Path

Post by kaiserkarl13 »

I'm not sure what you mean by a "map," but I'll assume you mean "directory" (so "submap" translates to "subdirectory"). Some people call them "folders" too (which also seems wrong to me...).

I don't have a Windows machine readily available on which to test this, but here are three possible options to get absolute paths:
  1. Use a DOS path:

    Code: Select all

    \includegraphics{C:\path\to\MyDocuments\MyPictures\Dirname\filename}
    
  2. Use a UNIX-like path (assuming it's on the same drive letter, this will probably work):

    Code: Select all

    \includegraphics{/path/to/MyDocuments/MyPictures/Dirname/filename}
  3. Use relative paths:

    Code: Select all

    \includegraphics{../../Dirname/filename} % or whatever is the right relative path
    
  4. Make a copy or soft link (shortcut) of file in current directory
I would test each of these out, but my results (on UNIX) won't be indicative of how DOS/Windows-based LaTeX builds will handle this.
Post Reply