LYXERR(Debug::LATEX, "exportfile:" << exportfile);
LYXERR(Debug::LATEX, "writefile:" << writefile);
- string const tex_format = (runparams.flavor == OutputParams::LATEX) ?
- "latex" : "pdflatex";
+ string const tex_format = flavor2format(runparams.flavor);
if (runparams.inComment || runparams.dryrun) {
//Don't try to load or copy the file if we're
//in a comment or doing a dryrun
tmp->markDepClean(masterBuffer->temppath());
// Don't assume the child's format is latex
- string const inc_format = tmp->bufferFormat();
+ string const inc_format = tmp->params().bufferFormat();
FileName const tmpwritefile(changeExtension(writefile.absFileName(),
formats.extension(inc_format)));
"was not exported correctly.\nWarning: "
"LaTeX export is probably incomplete."),
included_file.displayName());
- ErrorList & el = tmp->errorList("Export");
+ ErrorList const & el = tmp->errorList("Export");
if (!el.empty())
msg = bformat(from_ascii("%1$s\n\n%2$s\n\n%3$s"),
msg, el.begin()->error,
runparams.encoding = oldEnc;
runparams.master_language = oldLang;
- // I needed, use converters to produce a latex file from the child
- if (!tmp->isLatex()) {
+ // If needed, use converters to produce a latex file from the child
+ if (tmpwritefile != writefile) {
ErrorList el;
bool const success =
theConverters().convert(tmp, tmpwritefile, writefile,