X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetInclude.cpp;h=2c0c412d04591f706e1f7018e1db6ebfb6fe9f1d;hb=9914f21bceef9610bd1822f96eff0aa6d1a8df7c;hp=42b4d8f652f424297ebf19d625f8d0d231b5457a;hpb=7287a259c5436b8f3f384c0d0bd7641a2f2601e9;p=lyx.git diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp index 42b4d8f652..2c0c412d04 100644 --- a/src/insets/InsetInclude.cpp +++ b/src/insets/InsetInclude.cpp @@ -34,6 +34,7 @@ #include "LyXRC.h" #include "Lexer.h" #include "MetricsInfo.h" +#include "output_plaintext.h" #include "output_xhtml.h" #include "OutputParams.h" #include "TextClass.h" @@ -623,8 +624,9 @@ void InsetInclude::latex(otexstream & os, OutputParams const & runparams) const runparams.master_language = buffer().params().language; runparams.par_begin = 0; runparams.par_end = tmp->paragraphs().size(); + runparams.is_child = true; if (!tmp->makeLaTeXFile(tmpwritefile, masterFileName(buffer()). - onlyPath().absFileName(), runparams, false)) { + onlyPath().absFileName(), runparams, Buffer::OnlyBody)) { docstring msg = bformat(_("Included file `%1$s' " "was not exported correctly.\nWarning: " "LaTeX export is probably incomplete."), @@ -638,6 +640,7 @@ void InsetInclude::latex(otexstream & os, OutputParams const & runparams) const } runparams.encoding = oldEnc; runparams.master_language = oldLang; + runparams.is_child = false; // If needed, use converters to produce a latex file from the child if (tmpwritefile != writefile) { @@ -793,7 +796,7 @@ docstring InsetInclude::xhtml(XHTMLStream & xs, OutputParams const & rp) const if (all_pars) { op.par_begin = 0; op.par_end = 0; - ibuf->writeLyXHTMLSource(xs.os(), op, true); + ibuf->writeLyXHTMLSource(xs.os(), op, Buffer::IncludedFile); } else xs << XHTMLStream::ESCAPE_NONE << "