]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFeatures.C
remove redundant lyxerr.debugging checks; macro LYXERR already checks whether the...
[lyx.git] / src / LaTeXFeatures.C
index 46df0fec7c3b51ddfd857e97df6c106e4be37daa..42e2a00756f4bb15c4c784e2aa081835e27e1ee8 100644 (file)
@@ -31,6 +31,7 @@
 #include "support/docstream.h"
 #include "support/filetools.h"
 
+#include "frontends/controllers/biblio.h"
 
 namespace lyx {
 
@@ -152,7 +153,7 @@ bool LaTeXFeatures::isRequired(string const & name) const
 }
 
 
-bool LaTeXFeatures::isAvailable(string const & name) const
+bool LaTeXFeatures::isAvailable(string const & name)
 {
        if (packages_.empty())
                getAvailable();
@@ -378,7 +379,7 @@ string const LaTeXFeatures::getPackages() const
        // natbib.sty
        if (isRequired("natbib") && ! tclass.provides(LyXTextClass::natbib)) {
                packages << "\\usepackage[";
-               if (params_.cite_engine == biblio::ENGINE_NATBIB_NUMERICAL) {
+               if (params_.getEngine() == biblio::ENGINE_NATBIB_NUMERICAL) {
                        packages << "numbers";
                } else {
                        packages << "authoryear";
@@ -536,14 +537,16 @@ docstring const LaTeXFeatures::getLyXSGMLEntities() const
 docstring const LaTeXFeatures::getIncludedFiles(string const & fname) const
 {
        odocstringstream sgmlpreamble;
-       string const basename = onlyPath(fname);
+       // FIXME UNICODE
+       docstring const basename(from_utf8(onlyPath(fname)));
 
        FileMap::const_iterator end = IncludedFiles_.end();
        for (FileMap::const_iterator fi = IncludedFiles_.begin();
             fi != end; ++fi)
+               // FIXME UNICODE
                sgmlpreamble << "\n<!ENTITY " << fi->first
                             << (isSGMLFilename(fi->second) ? " SYSTEM \"" : " \"")
-                            << from_ascii(makeRelPath(fi->second, basename)) << "\">";
+                            << makeRelPath(from_utf8(fi->second), basename) << "\">";
 
        return sgmlpreamble.str();
 }