Jean-Marc Lasgouttes wrote:
> Almost all is said in the message title:
> 
> 1/ create a new document, add sweave module (or noweb probably)
> 2/ look at the View menu: the default format is DVI

Unless you specify a different default output format for the document in 
Document > Settings > Output. 

> I tried to understand the logic, but I am not sure what to do.

Look at:

string Buffer::getDefaultOutputFormat() const
{
        if (!params().default_output_format.empty()
            && params().default_output_format != "default")
                return params().default_output_format;
        typedef vector<Format const *> Formats;
        Formats formats = exportableFormats(true);
        if (isDocBook()
            || isLiterate()
            || params().useNonTeXFonts
            || params().encoding().package() == Encoding::japanese) {
                if (formats.empty())
                        return string();
                // return the first we find
                return formats.front()->name();
        }
        return lyxrc.default_view_format;
}

I guess DVI is the "first we find".

Perhaps it is enough to take out the isLiterate() condition, given that 
sweave can deal with the default view formats? I know nothing of sweave, so 
I don't know if this works.

Jürgen


Reply via email to