#include "debug.h"
#include "format.h"
#include "gettext.h"
+#include "language.h"
#include "LaTeX.h"
#include "frontends/Alert.h"
using std::find_if;
using std::string;
using std::vector;
+using std::distance;
namespace {
Converter::Converter(string const & f, string const & t, string const & c,
string const & l): from(f), to(t), command(c), flags(l),
- From(0), To(0), latex(false),
+ From(0), To(0), latex(false), xml(false),
original_dir(false), need_aux(false)
{}
flag_value = split(flag_value, flag_name, '=');
if (flag_name == "latex")
latex = true;
+ else if (flag_name == "xml")
+ xml = true;
else if (flag_name == "originaldir")
original_dir = true;
else if (flag_name == "needaux")
if (conv.latex)
if (contains(conv.to, "pdf"))
return OutputParams::PDFLATEX;
+ if (conv.xml)
+ return OutputParams::XML;
}
return OutputParams::LATEX;
}
}
OutputParams runparams;
runparams.flavor = getFlavor(edgepath);
-
string path = OnlyPath(from_file);
Path p(path);
namespace {
-class showMessage : public boost::signals::trackable {
+class showMessage : public std::unary_function<string, void>, public boost::signals::trackable {
public:
showMessage(Buffer const & b) : buffer_(b) {};
- void operator()(string const & m)
+ void operator()(string const & m) const
{
buffer_.message(m);
}
{
buffer.busy(true);
buffer.message(_("Running LaTeX..."));
+
+ runparams.document_language = buffer.params().language->babel();
// do the LaTeX run(s)
string name = buffer.getLatexName();