mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Fix preview of included files in child documents (bug #9583)
This commit is contained in:
parent
e5323de7cf
commit
5d41a22ee4
@ -31,7 +31,7 @@ OutputParams::OutputParams(Encoding const * enc)
|
||||
dryrun(false), silent(false), pass_thru(false),
|
||||
html_disable_captions(false), html_in_par(false),
|
||||
html_make_pars(true), for_toc(false), for_tooltip(false),
|
||||
for_search(false), includeall(false)
|
||||
for_search(false), for_preview(false), includeall(false)
|
||||
{
|
||||
// Note: in PreviewLoader::Impl::dumpPreamble
|
||||
// OutputParams runparams(0);
|
||||
|
@ -275,6 +275,9 @@ public:
|
||||
/// Are we generating this material for use by advanced search?
|
||||
bool for_search;
|
||||
|
||||
/// Are we generating this material for instant preview?
|
||||
bool for_preview;
|
||||
|
||||
/// Include all children notwithstanding the use of \includeonly
|
||||
bool includeall;
|
||||
|
||||
|
@ -555,7 +555,8 @@ void InsetInclude::latex(otexstream & os, OutputParams const & runparams) const
|
||||
from_utf8(incfile), true);
|
||||
}
|
||||
|
||||
FileName const writefile(makeAbsPath(mangled, masterBuffer->temppath()));
|
||||
FileName const writefile(makeAbsPath(mangled, runparams.for_preview ?
|
||||
buffer().temppath() : masterBuffer->temppath()));
|
||||
|
||||
LYXERR(Debug::LATEX, "incfile:" << incfile);
|
||||
LYXERR(Debug::LATEX, "exportfile:" << exportfile);
|
||||
@ -1091,6 +1092,7 @@ docstring latexString(InsetInclude const & inset)
|
||||
// by latex() anyway.
|
||||
OutputParams runparams(0);
|
||||
runparams.flavor = OutputParams::LATEX;
|
||||
runparams.for_preview = true;
|
||||
inset.latex(os, runparams);
|
||||
|
||||
return ods.str();
|
||||
|
Loading…
Reference in New Issue
Block a user