Stefan Schimanski wrote:

The paths are still absolute in \includegraphics. I have a path for the lyx file with a dot: ~/Arbeit/thesis.lyx. The . shows up as \lyxdot in the \includegraphics output. But \lyxdot is not defined.

Shouldn't those paths be relative?

I believe you are right yes. This has been changed by Bo I think in order to support embedded graphics. The code is in InsetGraphicsParams::Read():


bool InsetGraphicsParams::Read(Lexer & lex, string const & token, string const & bufpath)
{
        if (token == "filename") {
                lex.eatLine();
                filename.set(lex.getString(), bufpath);

'filename' is of 'EmbeddedFile' type. You can see that we use DocFileName::set() here and (FileName.cpp, line 854):

void DocFileName::set(string const & name, string const & buffer_path)
{
        FileName::set(name);
        if (!isAbsolute())
                FileName::set(makeAbsPath(name, buffer_path).absFilename());
        zipped_valid_ = false;
}

So we unconditionally make the path absolute in there. A simple change would be to just use FileName::set() instead because this doesn't touch at the absolute or relative property of the path.

Bo, would you like to comment.

Abdel.

Reply via email to