I'm writing my Lieder-Package right now, which provides commands to build sty-files which are basically data bases for songs. Inside these data base files, I use
\includegraphics and a relative path to call samples. These samples are stored in the same path as the data base file or nearby. i.e.: ~somePath/SoA/SongsOfAcients.sty and ~somePath/SoA/SongsOfAcients/sample1.pdf
The problem is, that when I call the data base file, the relative path refers to my document and not to the package. This is somehow logical, because the code is executed after full expansion, which is in the document.
As far as I can see, the currfile package isn't suitable, because it works only for packages loaded after currfile. Is there maybe a way for a work around with
\edefs or is there any TeX-primitive, which could be helpfull?