diff --git a/lib/citeengines/basic.citeengine b/lib/citeengines/basic.citeengine index ae4a603986..49e67f4d04 100644 --- a/lib/citeengines/basic.citeengine +++ b/lib/citeengines/basic.citeengine @@ -3,7 +3,6 @@ # The basic citation capabilities provided by BibTeX. # Mainly simple numeric styles primarily suitable for science and maths. # DescriptionEnd -# Excludes: jurabib | natbib | biblatex | biblatex-natbib # Author: Julien Rioux diff --git a/lib/citeengines/biblatex-natbib.citeengine b/lib/citeengines/biblatex-natbib.citeengine index 54c4356733..aedfb87b20 100644 --- a/lib/citeengines/biblatex-natbib.citeengine +++ b/lib/citeengines/biblatex-natbib.citeengine @@ -7,7 +7,6 @@ # than normal Biblatex. As with normal Biblatex, the use of 'biber' # as Bibliography processor is advised. # DescriptionEnd -# Excludes: basic | jurabib | biblatex | natbib # Author: Jürgen Spitzmüller diff --git a/lib/citeengines/biblatex.citeengine b/lib/citeengines/biblatex.citeengine index 957fba0116..66cbfe3355 100644 --- a/lib/citeengines/biblatex.citeengine +++ b/lib/citeengines/biblatex.citeengine @@ -5,7 +5,6 @@ # and provides many features that are not possible with BibTeX. # The use of 'biber' as bibliography processor is advised. # DescriptionEnd -# Excludes: basic | jurabib | natbib | biblatex-natbib # Author: Jürgen Spitzmüller diff --git a/lib/citeengines/jurabib.citeengine b/lib/citeengines/jurabib.citeengine index 2d6cb0d232..95d66328ff 100644 --- a/lib/citeengines/jurabib.citeengine +++ b/lib/citeengines/jurabib.citeengine @@ -4,7 +4,6 @@ # and the Humanities. It includes localizations for English, German, French, Dutch, # Spanish and Italian. # DescriptionEnd -# Excludes: basic | natbib | biblatex | biblatex-natbib # Author: Julien Rioux diff --git a/lib/citeengines/natbib.citeengine b/lib/citeengines/natbib.citeengine index 6a263022a5..89200ddf2b 100644 --- a/lib/citeengines/natbib.citeengine +++ b/lib/citeengines/natbib.citeengine @@ -5,7 +5,6 @@ # numerical citations, annotations, capitalization of the `van' part of # author names, shortened and full author lists, and more. # DescriptionEnd -# Excludes: basic | jurabib | biblatex | biblatex-natbib # Author: Julien Rioux diff --git a/lib/configure.py b/lib/configure.py index 43d392978d..4ba71c953f 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -1511,7 +1511,7 @@ def checkCiteEnginesConfig(): ## It has been automatically generated by configure ## Use "Options/Reconfigure" if you need to update it after a ## configuration change. -## "CiteEngineName" "filename" "CiteEngineType" "CiteFramework" "DefaultBiblio" "Description" "Packages" "Requires" "Excludes" +## "CiteEngineName" "filename" "CiteEngineType" "CiteFramework" "DefaultBiblio" "Description" "Packages" ''') # build the list of available modules @@ -1546,22 +1546,17 @@ def processCiteEngineFile(file, filename, bool_docbook): #DescriptionBegin #...body of description... #DescriptionEnd - #Requires: [list of required engines] - #Excludes: [list of excluded engines] - The last two lines are optional. We expect output: - "CiteEngineName" "filename" "CiteEngineType" "CiteFramework" "DefaultBiblio" "Description" "Packages" "Requires" "Excludes" + "CiteEngineName" "filename" "CiteEngineType" "CiteFramework" "DefaultBiblio" "Description" "Packages" ''' remods = re.compile(r'\DeclareLyXCiteEngine\s*(?:\[([^]]*?)\])?{(.*)}') - rereqs = re.compile(r'#+\s*Requires:\s*(.*)') - reexcs = re.compile(r'#+\s*Excludes:\s*(.*)') redbeg = re.compile(r'#+\s*DescriptionBegin\s*$') redend = re.compile(r'#+\s*DescriptionEnd\s*$') recet = re.compile(r'\s*CiteEngineType\s*(.*)') redb = re.compile(r'\s*DefaultBiblio\s*(.*)') resfm = re.compile(r'\s*CiteFramework\s*(.*)') - modname = desc = pkgs = req = excl = cet = db = cfm = "" + modname = desc = pkgs = cet = db = cfm = "" readingDescription = False descLines = [] @@ -1589,18 +1584,6 @@ def processCiteEngineFile(file, filename, bool_docbook): tmp = [s.strip() for s in pkgs.split(",")] pkgs = ",".join(tmp) continue - res = rereqs.search(line) - if res != None: - req = res.group(1) - tmp = [s.strip() for s in req.split("|")] - req = "|".join(tmp) - continue - res = reexcs.search(line) - if res != None: - excl = res.group(1) - tmp = [s.strip() for s in excl.split("|")] - excl = "|".join(tmp) - continue res = recet.search(line) if res != None: cet = res.group(1) @@ -1635,7 +1618,7 @@ def processCiteEngineFile(file, filename, bool_docbook): cm.write(line + '\n') cm.close() - return '"%s" "%s" "%s" "%s" "%s" "%s" "%s" "%s" "%s"\n' % (modname, filename, cet, cfm, db, desc, pkgs, req, excl) + return '"%s" "%s" "%s" "%s" "%s" "%s" "%s"\n' % (modname, filename, cet, cfm, db, desc, pkgs) def checkTeXAllowSpaces(): diff --git a/src/CiteEnginesList.cpp b/src/CiteEnginesList.cpp index 118c1b7a59..2b8de05255 100644 --- a/src/CiteEnginesList.cpp +++ b/src/CiteEnginesList.cpp @@ -40,11 +40,9 @@ CiteEnginesList theCiteEnginesList; LyXCiteEngine::LyXCiteEngine(string const & n, string const & i, vector const & cet, string const & cfm, vector const & dbs, - string const & d, vector const & p, - vector const & r, vector const & e): + string const & d, vector const & p): name_(n), id_(i), engine_types_(cet), cite_framework_(cfm), default_biblios_(dbs), - description_(d), package_list_(p), required_engines_(r), excluded_engines_(e), - checked_(false), available_(false) + description_(d), package_list_(p), checked_(false), available_(false) { filename_ = id_ + ".citeengine"; } @@ -86,39 +84,6 @@ bool LyXCiteEngine::hasEngineType(CiteEngineType const & et) const } -bool LyXCiteEngine::isCompatible(string const & cename) const -{ - // do we exclude it? - if (find(excluded_engines_.begin(), excluded_engines_.end(), cename) != - excluded_engines_.end()) - return false; - - LyXCiteEngine const * const lm = theCiteEnginesList[cename]; - if (!lm) - return true; - - // does it exclude us? - vector const excengs = lm->getExcludedEngines(); - if (find(excengs.begin(), excengs.end(), id_) != excengs.end()) - return false; - - return true; -} - - -bool LyXCiteEngine::areCompatible(string const & eng1, string const & eng2) -{ - LyXCiteEngine const * const lm1 = theCiteEnginesList[eng1]; - if (lm1) - return lm1->isCompatible(eng2); - LyXCiteEngine const * const lm2 = theCiteEnginesList[eng2]; - if (lm2) - return lm2->isCompatible(eng1); - // Can't check it either way. - return true; -} - - string LyXCiteEngine::getDefaultBiblio(CiteEngineType const & cet) const { string res; @@ -273,29 +238,9 @@ bool CiteEnginesList::read() str = split(str, p, ','); pkgs.push_back(p); } - if (!lex.next()) - break; - str = lex.getString(); - LYXERR(Debug::TCLASS, "Required: " << str); - vector req; - while (!str.empty()) { - string p; - str = split(str, p, '|'); - req.push_back(p); - } - if (!lex.next()) - break; - str = lex.getString(); - LYXERR(Debug::TCLASS, "Excluded: " << str); - vector exc; - while (!str.empty()) { - string p; - str = split(str, p, '|'); - exc.push_back(p); - } // This code is run when we have - // cename, fname, desc, pkgs, req and exc - addCiteEngine(cename, fname, cets, citeframework, dbs, desc, pkgs, req, exc); + // cename, fname, cets, citeframework, dbs, desc, pkgs + addCiteEngine(cename, fname, cets, citeframework, dbs, desc, pkgs); } // end switch } //end while @@ -310,10 +255,9 @@ bool CiteEnginesList::read() void CiteEnginesList::addCiteEngine(string const & cename, string const & filename, vector const & cets, string const & citeframework, vector const & dbs, - string const & description, vector const & pkgs, - vector const & req, vector const & exc) + string const & description, vector const & pkgs) { - LyXCiteEngine ce(cename, filename, cets, citeframework, dbs, description, pkgs, req, exc); + LyXCiteEngine ce(cename, filename, cets, citeframework, dbs, description, pkgs); englist_.push_back(ce); } diff --git a/src/CiteEnginesList.h b/src/CiteEnginesList.h index 42264863c5..83fb875161 100644 --- a/src/CiteEnginesList.h +++ b/src/CiteEnginesList.h @@ -54,9 +54,7 @@ public: std::string const & cfm, std::vector const & defaultbiblios, std::string const & description, - std::vector const & packagelist, - std::vector const & requires, - std::vector const & excludes); + std::vector const & packagelist); /// whether the required packages are available bool isAvailable() const; /// the missing prerequisites, if any @@ -82,19 +80,6 @@ public: /// std::vector const & getPackageList() const { return package_list_; } - /// - std::vector const & getRequiredEngines() const - { return required_engines_; } - /// Engines this one excludes: the list should be treated disjunctively - std::vector const & getExcludedEngines() const - { return excluded_engines_; } - /// \return true if the engine is compatible with this one, i.e., - /// it does not exclude us and we do not exclude it. - /// this will also return true if cename is unknown and we do not - /// exclude it, since in that case we cannot check its exclusions. - bool isCompatible(std::string const & cename) const; - /// - static bool areCompatible(std::string const & eng1, std::string const & eng2); private: /// what appears in the ui std::string name_; @@ -113,10 +98,6 @@ private: std::string description_; /// the LaTeX packages on which this depends, if any std::vector package_list_; - /// Engines this one requires: at least one - std::vector required_engines_; - /// Engines this one excludes: none of these - std::vector excluded_engines_; // these are mutable because they are used to cache the results // or an otherwise const operation. /// @@ -167,7 +148,6 @@ public: void addCiteEngine(std::string const &, std::string const &, std::vector const &, std::string const &, std::vector const &, std::string const &, - std::vector const &, std::vector const &, std::vector const &); /// std::vector englist_;