In most of my work, I use a specific .tex ("main".tex) file with a preamble and \begin
- and \end{document}
. In the document I use \input{...}
to another .tex file, with no preamble. Let's say "main".tex is located in H:.
My problem is, that when I use a music notation system called "Lilypond", it generates a .tex file with relative paths to pictures. Let's say it's called "lilypond".tex and is located in H:/lilypond/.
When "lilypond".tex is included in my "main".tex file, I get an error because the pictures cannot be located: The compiler searches in H:, because the paths in "lilypond".tex are relative.
How can I avoid this problem, without having to manually edit my "main".tex according to every specific file I might include?
I use Emacs, and have thought of making a macro to run through the "lilypond".tex-file and edit paths, but it might be a little inconvenient.