From 694611172752189b62488aed3581b5f6385c54ea Mon Sep 17 00:00:00 2001 From: Julien Rioux Date: Wed, 30 Mar 2011 22:37:51 +0000 Subject: [PATCH] with nonTeXFonts, use xelatex to produce the requested .aux file, since plain old latex will likely choke on the generated .tex file git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38168 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Converter.cpp | 11 +++++++++-- src/Converter.h | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Converter.cpp b/src/Converter.cpp index 2b83b3d479..8c6c848dd8 100644 --- a/src/Converter.cpp +++ b/src/Converter.cpp @@ -194,6 +194,10 @@ void Converters::add(string const & from, string const & to, if (converter.latex && (latex_command_.empty() || converter.latex_flavor == "latex")) latex_command_ = subst(command, token_from, ""); + // Similarly, set xelatex_command to xelatex. + if (converter.latex + && (xelatex_command_.empty() || converter.latex_flavor == "xelatex")) + xelatex_command_ = subst(command, token_from, ""); if (it == converterlist_.end()) { converterlist_.push_back(converter); @@ -397,9 +401,12 @@ bool Converters::convert(Buffer const * buffer, } else { if (conv.need_aux && !run_latex && !latex_command_.empty()) { - LYXERR(Debug::FILES, "Running " << latex_command_ + string const command = (buffer && buffer->params().useNonTeXFonts) ? + xelatex_command_ : latex_command_; + LYXERR(Debug::FILES, "Running " << command << " to update aux file"); - runLaTeX(*buffer, latex_command_, runparams, errorList); + if (!runLaTeX(*buffer, command, runparams, errorList)) + return false; } // FIXME UNICODE diff --git a/src/Converter.h b/src/Converter.h index ed22406f10..1ab57fd7ad 100644 --- a/src/Converter.h +++ b/src/Converter.h @@ -158,6 +158,8 @@ private: ConverterList converterlist_; /// std::string latex_command_; + /// + std::string xelatex_command_; /// If \p from = /path/file.ext and \p to = /path2/file2.ext2 then /// this method moves each /path/file*.ext file to /path2/file2*.ext2 bool move(std::string const & fmt,