]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFeatures.cpp
Extend LATEXIFY command param handling and add literal param.
[lyx.git] / src / LaTeXFeatures.cpp
index 4c993b6f7b9c55041a4a08e1e9b2f0490b5725d2..08e1470561e7cd97ffde86067286a4a65ba9bb99 100644 (file)
@@ -865,10 +865,11 @@ void LaTeXFeatures::getFontEncodings(vector<string> & encodings) const
 {
        // these must be loaded if glyphs of this script are used
        // unless a language providing them is used in the document
-       // FIXME: currently the option is written twice in this case
-       if (mustProvide("textgreek"))
+       if (mustProvide("textgreek")
+           && find(encodings.begin(), encodings.end(), "LGR") == encodings.end())
                encodings.insert(encodings.begin(), "LGR");
-       if (mustProvide("textcyr"))
+       if (mustProvide("textcyr")
+           && find(encodings.begin(), encodings.end(), "T2A") == encodings.end())
                encodings.insert(encodings.begin(), "T2A");
 
        LanguageList::const_iterator it  = UsedLanguages_.begin();
@@ -1211,6 +1212,8 @@ string const LaTeXFeatures::getPackages() const
                        packages << "numbers";
                else
                        packages << "authoryear";
+               if (!params_.biblio_opts.empty())
+                       packages << ',' << params_.biblio_opts;
                packages << "]{natbib}\n";
        }
 
@@ -1222,8 +1225,12 @@ string const LaTeXFeatures::getPackages() const
        }
 
        // jurabib -- we need version 0.6 at least.
-       if (mustProvide("jurabib"))
-               packages << "\\usepackage{jurabib}[2004/01/25]\n";
+       if (mustProvide("jurabib")) {
+               packages << "\\usepackage";
+               if (!params_.biblio_opts.empty())
+                       packages << '[' << params_.biblio_opts << ']';
+               packages << "{jurabib}[2004/01/25]\n";
+       }
 
        // opcit -- we pass custombst as we output \bibliographystyle ourselves
        if (mustProvide("opcit")) {