TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've recently migrated to LyX from LaTeX, recognizing some of the tradeoffs. There is one however I can't seem to work with.

I have a multi document LyX project, it's my thesis. I have a main file that only contains child documents. I keep my entire thesis under careful version control, and so it has its own directory structure that I keep consistent to minimize manual edits (e.g. I edit a code that is included as a listing, then when I checkout the new version on a new computer it should automatically compile with the new code wherever I have included it)

However LyX keeps maintaining a static directory structure: the one associated with my laptop (e.g.: /users/me/temp/temp2/checked_out_thesis/). I however move around a lot and often edit on different machines. This presents frustrating compilation issues, and often I manually have to go through and change the paths on all the figures and listings.

Is there a way to use only one path, independently of what machine I might be on?

share|improve this question

You can add a script that automatically corrects that (using sed for example) for you.

But on my LyX version 2.0.4 it puts the relative paths if the files you are including are in the same folder as the tex file. Are you using the LyX graphic formats conversions ?

share|improve this answer
Thanks for the reply. The included files do use relative paths, so it will compile with errors but will ignore things like figures or listings that are inside the included files, all of which have nonrelative paths (and attempting obvious solutions like "../figures/my_figure.eps" produces errors) I'm still playing around with it. Was hoping to avoid a scripting solution, as figuring those out eat up hours of time I could be writing instead. – Reid.Atcheson Oct 13 '12 at 20:23
Update: My relative path was wrong, that's why it didn't work. I just misunderstood the error. I needed ../../figures/etc. – Reid.Atcheson Oct 13 '12 at 20:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.