From 9c4abdf137821e94f29fbcbcdd92bf00d4c06ddc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20St=C3=B6hr?= Date: Wed, 10 Aug 2011 02:49:30 +0000 Subject: [PATCH] =?UTF-8?q?also=20for=20branch:=20new=20export=20flavor=20?= =?UTF-8?q?"DVILUATEX",=20fixes=20bug=20#7713,=20patch=20from=20J=C3=BCrge?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@39461 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/configure.py | 2 +- src/Buffer.cpp | 2 ++ src/BufferParams.cpp | 9 +++++++-- src/Converter.cpp | 3 +++ src/Format.cpp | 1 + src/OutputParams.cpp | 4 ++-- src/OutputParams.h | 1 + src/frontends/qt4/GuiPrefs.cpp | 4 +++- src/insets/InsetExternal.cpp | 7 ++++--- status.20x | 4 +++- 10 files changed, 27 insertions(+), 10 deletions(-) diff --git a/lib/configure.py b/lib/configure.py index 3d38d1e9b2..575189021f 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -466,7 +466,7 @@ def checkLuatex(): logger.info(msg + ' yes') addToRC(r'\converter luatex pdf5 "%s" "latex=lualatex"' % LUATEX) if DVILUATEX != '': - addToRC(r'\converter luatex dvi3 "%s" "latex=lualatex"' % DVILUATEX) + addToRC(r'\converter luatex dvi3 "%s" "latex=dvilualatex"' % DVILUATEX) # remove temporary files removeFiles(['luatest.tex', 'luatest.log', 'luatest.aux', 'luatest.pdf']) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 238225bcb3..8151cc5128 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -3421,6 +3421,8 @@ bool Buffer::doExport(string const & format, bool put_in_tempdir, runparams.flavor = OutputParams::PDFLATEX; else if (backend_format == "luatex") runparams.flavor = OutputParams::LUATEX; + else if (backend_format == "dviluatex") + runparams.flavor = OutputParams::DVILUATEX; else if (backend_format == "xetex") runparams.flavor = OutputParams::XETEX; } diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index 74b5ab5e6a..09b970b01a 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -1119,6 +1119,7 @@ void BufferParams::validate(LaTeXFeatures & features) const switch (features.runparams().flavor) { case OutputParams::LATEX: + case OutputParams::DVILUATEX: if (dvipost) { features.require("ct-dvipost"); features.require("dvipost"); @@ -2120,9 +2121,12 @@ vector BufferParams::backends() const if (v.back() == "latex") { v.push_back("pdflatex"); v.push_back("luatex"); + v.push_back("dviluatex"); v.push_back("xetex"); - } else if (v.back() == "xetex") + } else if (v.back() == "xetex") { v.push_back("luatex"); + v.push_back("dviluatex"); + } v.push_back("xhtml"); v.push_back("text"); v.push_back("lyx"); @@ -2620,7 +2624,8 @@ void BufferParams::writeEncodingPreamble(otexstream & os, return; // LuaTeX neither, but with tex fonts, we need to load // the luainputenc package. - if (features.runparams().flavor == OutputParams::LUATEX) { + if (features.runparams().flavor == OutputParams::LUATEX + || features.runparams().flavor == OutputParams::DVILUATEX) { if (!useNonTeXFonts && inputenc != "default" && ((inputenc == "auto" && language->encoding()->package() == Encoding::inputenc) || (inputenc != "auto" && encoding().package() == Encoding::inputenc))) { diff --git a/src/Converter.cpp b/src/Converter.cpp index ff1d7093bf..16ff6033d4 100644 --- a/src/Converter.cpp +++ b/src/Converter.cpp @@ -266,6 +266,8 @@ OutputParams::FLAVOR Converters::getFlavor(Graph::EdgePath const & path) return OutputParams::XETEX; if (conv.latex_flavor == "lualatex") return OutputParams::LUATEX; + if (conv.latex_flavor == "dvilualatex") + return OutputParams::DVILUATEX; if (conv.latex_flavor == "pdflatex") return OutputParams::PDFLATEX; if (conv.xml) @@ -776,6 +778,7 @@ vector Converters::savers() const v.push_back("latex"); v.push_back("literate"); v.push_back("luatex"); + v.push_back("dviluatex"); v.push_back("lyx"); v.push_back("xhtml"); v.push_back("pdflatex"); diff --git a/src/Format.cpp b/src/Format.cpp index a528ce20c8..cd2d238dc8 100644 --- a/src/Format.cpp +++ b/src/Format.cpp @@ -422,6 +422,7 @@ typedef Translator FlavorTranslator; FlavorTranslator initFlavorTranslator() { FlavorTranslator f(OutputParams::LATEX, "latex"); + f.addPair(OutputParams::DVILUATEX, "dviluatex"); f.addPair(OutputParams::LUATEX, "luatex"); f.addPair(OutputParams::PDFLATEX, "pdflatex"); f.addPair(OutputParams::XETEX, "xetex"); diff --git a/src/OutputParams.cpp b/src/OutputParams.cpp index dc3d396426..a0e7a1c40a 100644 --- a/src/OutputParams.cpp +++ b/src/OutputParams.cpp @@ -45,14 +45,14 @@ OutputParams::~OutputParams() bool OutputParams::isLaTeX() const { - return flavor == LATEX || flavor == LUATEX + return flavor == LATEX || flavor == LUATEX || flavor == DVILUATEX || flavor == PDFLATEX || flavor == XETEX; } bool OutputParams::isFullUnicode() const { - return flavor == LUATEX || flavor == XETEX; + return flavor == LUATEX|| flavor == DVILUATEX || flavor == XETEX; } } // namespace lyx diff --git a/src/OutputParams.h b/src/OutputParams.h index 50009ebbbc..1a7326ddd8 100644 --- a/src/OutputParams.h +++ b/src/OutputParams.h @@ -28,6 +28,7 @@ class Language; class OutputParams { public: enum FLAVOR { + DVILUATEX, LATEX, LUATEX, PDFLATEX, diff --git a/src/frontends/qt4/GuiPrefs.cpp b/src/frontends/qt4/GuiPrefs.cpp index d77893f67c..16be7bc53a 100644 --- a/src/frontends/qt4/GuiPrefs.cpp +++ b/src/frontends/qt4/GuiPrefs.cpp @@ -43,6 +43,7 @@ #include "support/filetools.h" #include "support/foreach.h" #include "support/gettext.h" +#include "support/lassert.h" #include "support/lstrings.h" #include "support/os.h" #include "support/Package.h" @@ -1526,7 +1527,7 @@ void PrefSpellchecker::on_spellcheckerCB_currentIndexChanged(int index) { QString spellchecker = spellcheckerCB->itemData(index).toString(); - compoundWordCB->setEnabled(spellchecker != QString("native")); + compoundWordCB->setEnabled(spellchecker == QString("aspell")); } @@ -1924,6 +1925,7 @@ void PrefFileformats::updateView() formatsCB->addItem(qt_(cit->prettyname()), QVariant(form_->formats().getNumber(cit->name()))); if (form_->converters().isReachable("latex", cit->name()) + || form_->converters().isReachable("dviluatex", cit->name()) || form_->converters().isReachable("pdflatex", cit->name()) || form_->converters().isReachable("luatex", cit->name()) || form_->converters().isReachable("xetex", cit->name())) diff --git a/src/insets/InsetExternal.cpp b/src/insets/InsetExternal.cpp index f3ea34c011..8126d459a9 100644 --- a/src/insets/InsetExternal.cpp +++ b/src/insets/InsetExternal.cpp @@ -36,18 +36,18 @@ #include "graphics/PreviewLoader.h" +#include "support/bind.h" #include "support/convert.h" #include "support/debug.h" #include "support/ExceptionMessage.h" #include "support/filetools.h" #include "support/gettext.h" +#include "support/lassert.h" #include "support/lstrings.h" #include "support/lyxlib.h" -#include "support/Translator.h" - -#include "support/bind.h" #include +#include using namespace std; using namespace lyx::support; @@ -729,6 +729,7 @@ void InsetExternal::validate(LaTeXFeatures & features) const string format; switch (features.runparams().flavor) { case OutputParams::LATEX: + case OutputParams::DVILUATEX: format = "LaTeX"; break; case OutputParams::LUATEX: diff --git a/status.20x b/status.20x index acf95cb556..49396b59e5 100644 --- a/status.20x +++ b/status.20x @@ -121,6 +121,8 @@ What's new - Improve import of LaTeX documents with non-ASCII contents before loading the inputenc package (bug 7509). +- The export format DVI (LuaTeX) is now correctly created (bug7713). + - Macros that use other macros now output properly to XHTML (bug 7532). - Fixed XHTML output for tables that use multirow. @@ -136,7 +138,7 @@ What's new - On Windows, allow to automatically switch TeX engines without the need of manually saving the preferences after reconfiguring (bug 7557). -- Fix dvi forward search on Windows when compiling with MSVC. +- Fix DVI forward search on Windows when compiling with MSVC. - Calculate relative pathnames to master documents when master is in a directory above the child (bug 7540).