mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
Fix bug ##9627: Make the document name available to preview insets
The \jobname macro is redefined for the preview snippets such that it contains the name of the document without extension. This is harmless because the moment it is redefined, TeX has already chosen the name of the output and log files. On the other hand, any use of \jobname in preview snippets is now consistent with what one obtains after exporting and compiling by hand.
This commit is contained in:
parent
cb51493f94
commit
1c94995aef
@ -639,6 +639,11 @@ void PreviewLoader::Impl::startLoading(bool wait)
|
|||||||
}
|
}
|
||||||
of << "\\batchmode\n";
|
of << "\\batchmode\n";
|
||||||
|
|
||||||
|
// Set \jobname of previews to the document name (see bug 9627)
|
||||||
|
of << "\\def\\jobname{"
|
||||||
|
<< from_utf8(changeExtension(buffer_.latexName(true), ""))
|
||||||
|
<< "}\n";
|
||||||
|
|
||||||
LYXERR(Debug::LATEX, "Format = " << buffer_.params().getDefaultOutputFormat());
|
LYXERR(Debug::LATEX, "Format = " << buffer_.params().getDefaultOutputFormat());
|
||||||
string latexparam = "";
|
string latexparam = "";
|
||||||
bool docformat = !buffer_.params().default_output_format.empty()
|
bool docformat = !buffer_.params().default_output_format.empty()
|
||||||
|
Loading…
Reference in New Issue
Block a user