#include "support/debug.h"
#include "support/FileNameList.h"
#include "support/filetools.h"
-#include "support/FileZipListDir.h"
#include "support/gettext.h"
#include "support/lstrings.h"
#include "support/os.h"
string const token_base("$$b");
string const token_to("$$o");
string const token_path("$$p");
+string const token_orig_path("$$r");
cit != path.end(); ++cit) {
Converter const & conv = converterlist_[*cit];
if (conv.latex)
+ if (contains(conv.from, "xetex"))
+ return OutputParams::XETEX;
if (contains(conv.to, "pdf"))
return OutputParams::PDFLATEX;
if (conv.xml)
return true;
}
}
+
+ // only warn once per session and per file type
+ static std::map<string, string> warned;
+ if (warned.find(from_format) != warned.end() && warned.find(from_format)->second == to_format) {
+ return false;
+ }
+ warned.insert(make_pair(from_format, to_format));
+
Alert::error(_("Cannot convert file"),
bformat(_("No information for converting %1$s "
"format files to %2$s.\n"
// used anyway.
OutputParams runparams(buffer ? &buffer->params().encoding() : 0);
runparams.flavor = getFlavor(edgepath);
+
+ runparams.use_indices = buffer->params().use_indices;
+
+ if (buffer)
+ runparams.use_japanese = buffer->bufferFormat() == "platex";
// Some converters (e.g. lilypond) can only output files to the
// current directory, so we need to change the current directory.
command = subst(command, token_from, quoteName(infile2));
command = subst(command, token_base, quoteName(from_base));
command = subst(command, token_to, quoteName(outfile2));
+ command = subst(command, token_path, quoteName(infile.onlyPath().absFilename()));
+ command = subst(command, token_orig_path, quoteName(orig_from.onlyPath().absFilename()));
command = libScriptSearch(command);
if (!conv.parselog.empty())