I use a .tex file that I sync with Dropbox across two computers, - mac (running win 7) and a pc.
The problem is that the .tex file is large, and contains a lot of tex commands (even user-written ones) like:
\addbibresource{D:/Gdrive/Drop/Dropbox/latex/main/my.file.tex}
Of course, this is the absolute path on my PC and the same file on my mac looks like:
\addbibresource{C:\Dropbox\latex\main\my.file.tex}
Note how / are changed in \ and how the path is different.
My question is: how can I simply (and quickly) change all the paths when I move from my pc to my mac and vice versa? I use the latest winedt version to edit my latex file.
Many thanks for your help!
\addbibresource{...\main\other\my_other_file.tex}if I need to access a tex file that is located in the main\other folder? (Recall that the current tex file is located in main) – ℕʘʘḆḽḘ Jul 20 '14 at 10:50\addbibresource{file.bib}(sorry, but I think that.bibis more appropriate for\addbibresourcecommand) is the solution iflatex/main/is the working directory for both system. – Jul 20 '14 at 10:54.texfile that is located in themain\otherfolder you have to write\input{main/other/file.tex}– Jul 20 '14 at 10:58...command right? – ℕʘʘḆḽḘ Jul 20 '14 at 11:05../go back in the folder. – Jul 20 '14 at 12:21pdflatex(or whichever). So if you runpdflatex main/my.filethen the paths should be relative to thelatexdirectory (i.e. to get tomain/other/fileyou would simply put that). If you change into themainfolder and runpdflatex my.file, then to get to theotherfolder you should put../other/file. This messed me up so many times when I was using subfiles... :-) – darthbith Jul 20 '14 at 12:27sed,awk, andtrunavailable to you? I agree that you should always use relative paths, but for this one-time fix you might be able to do some good old regex-based substitution. – shadowtalker Jul 20 '14 at 14:32