PhilipPirrip wrote: > I suspect the other slash was added as a bug fix for those OS's that do > not have it at the end of the path, can't see any other reason. > So I suppose this should be tested on OSX and Windows as well.
It is not an OS issue. LyX has an OS abstraction layer for this kind of stuff, and therefore the code that determines the path returns a slash at the end for all OSes. I'll remove the second slash (not in the stable 2.1 branch of course), and we'll see if anybody screams (but I doubt that). > I wish this was true, but no... \filename@parse only *parses* (no search > involved) its argument for the three parts, and it does it in a very > primitive way. > > > \documentclass{article} > \begin{document} > \makeatletter > \filename@parse{/home/user/doesn.t exist/test v2.1 new.bib} > \texttt{\meaning\filename@area} > > \texttt{\meaning\filename@base} > > \texttt{\meaning\filename@ext} > > \texttt{\meaning\input@path} > \makeatother > \end{document} > > > check: > http://tex.stackexchange.com/questions/39634/how-to-trim-tex-for-each-filename-read-from-an-external-file OK, then I misunderstood the TeX code (I used to be better at that). > Since the way \input@path is being used in the biblatex hack from > http://wiki.lyx.org/BibTeX/Biblatex is barely legal, maybe LyX should > define its own command, say \LyX@basepath that'd contain the absolute > path to the master .lyx document (no qoutes, no curly braces - only for > the brave). > Would you be willing to do that? (being that biblatex support is nowhere > on the horizon yet) After all these discussions it is clear that something like this is needed. However, I do not want to clutter all documents with that (since 95% of the users don't need it). I would prefer a solution where we extend the layout definition language so that you could use a placeholder that will be replaced by LyX with the master document path. Then everybody who needs this path could write a module that pulls in the path into a LaTeX macro in the most simple case, or in more advanced cases it could directly be used in the preamble code that needs it. Georg