Andre Poenitz wrote: > There is another one: Currently, \lyxlock gets written to the .tex > snippets. This indicates that preview uses the "write to .lyx" > method instead of "write to .tex" (I think this is a boolean flag > somewhere, haven't looked at it, though)
Do you mean the 'nice' flag passed to makeLaTeXFile? I have to admit, I just cut and pasted it from elsewhere and have no idea about it's real meaning. void Buffer::makeLaTeXFile(ostream & os, string const & original_path, bool nice, bool only_body, bool only_preamble) It is passed as 'true' by the preview code. Should I reset it to 'false'? void PreviewLoader::Impl::dumpPreamble(ostream & os) const { // Why on earth is Buffer::makeLaTeXFile a non-const method? Buffer & tmp = const_cast<Buffer &>(buffer_); // Dump the preamble only. tmp.makeLaTeXFile(os, buffer_.filePath(), true, false, true); // Loop over the insets in the buffer and dump all the math-macros. Buffer::inset_iterator it = buffer_.inset_const_iterator_begin(); Buffer::inset_iterator end = buffer_.inset_const_iterator_end(); for (; it != end; ++it) if (it->lyxCode() == Inset::MATHMACRO_CODE) it->latex(&buffer_, os, true, true); -- Angus