X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetInclude.cpp;h=2c0c412d04591f706e1f7018e1db6ebfb6fe9f1d;hb=9914f21bceef9610bd1822f96eff0aa6d1a8df7c;hp=e7f9da374754862e4fdaee973b0b4ec7365c7229;hpb=f25e7c340b7b82af161f9cf6adbb537ea260fc28;p=lyx.git diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp index e7f9da3747..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,6 +624,7 @@ 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, Buffer::OnlyBody)) { docstring msg = bformat(_("Included file `%1$s' " @@ -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, Buffer::OnlyBody); + ibuf->writeLyXHTMLSource(xs.os(), op, Buffer::IncludedFile); } else xs << XHTMLStream::ESCAPE_NONE << "