bool const output_preamble =
output == FullSource || output == OnlyPreamble;
bool const output_body =
- output == FullSource || output == OnlyBody;
+ output == FullSource || output == OnlyBody || output == IncludedFile;
if (output_preamble) {
os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
}
if (output_body) {
- os << "<body>\n";
+ bool const output_body_tag = (output != IncludedFile);
+ if (output_body_tag)
+ os << "<body>\n";
XHTMLStream xs(os);
params().documentClass().counters().reset();
xhtmlParagraphs(text(), *this, xs, runparams);
- os << "</body>\n";
+ if (output_body_tag)
+ os << "</body>\n";
}
if (output_preamble)
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
<< "<!-- Included file: "