+Buffer::ExportStatus Buffer::doExport(string const & target, bool put_in_tempdir)
+ const
+{
+ string result_file;
+ return doExport(target, put_in_tempdir, result_file);
+}
+
+Buffer::ExportStatus Buffer::doExport(string const & target, bool put_in_tempdir,
+ string & result_file) const
+{
+ bool const update_unincluded =
+ params().maintain_unincluded_children
+ && !params().getIncludedChildren().empty();
+
+ // (1) export with all included children (omit \includeonly)
+ if (update_unincluded) {
+ ExportStatus const status =
+ doExport(target, put_in_tempdir, true, result_file);
+ if (status != ExportSuccess)
+ return status;
+ }
+ // (2) export with included children only
+ return doExport(target, put_in_tempdir, false, result_file);
+}
+
+
+void Buffer::setMathFlavor(OutputParams & op) const
+{
+ switch (params().html_math_output) {
+ case BufferParams::MathML:
+ op.math_flavor = OutputParams::MathAsMathML;
+ break;
+ case BufferParams::HTML:
+ op.math_flavor = OutputParams::MathAsHTML;
+ break;
+ case BufferParams::Images:
+ op.math_flavor = OutputParams::MathAsImages;
+ break;
+ case BufferParams::LaTeX:
+ op.math_flavor = OutputParams::MathAsLaTeX;
+ break;
+ }
+}
+
+
+Buffer::ExportStatus Buffer::doExport(string const & target, bool put_in_tempdir,