]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFeatures.C
Add GraphicsTypes.h to libgraphics_la_SOURCES
[lyx.git] / src / LaTeXFeatures.C
index 01049c315e9aeeaae244373ef2a39559cf224930..15102ef3c20b6e580f05b90086f8f3ad327fa036 100644 (file)
@@ -33,6 +33,10 @@ using lyx::textclass_type;
 
 using std::endl;
 using std::set;
+using std::vector;
+using std::find;
+using std::ostream;
+
 
 LaTeXFeatures::LaTeXFeatures(BufferParams const & p, layout_type n)
        : layout(n, false), params(p)
@@ -44,16 +48,11 @@ void LaTeXFeatures::require(string const & name)
        if (isRequired(name))
                return;
        
-       // INSET_GRAPHICS: remove this when InsetFig is thrown.
-       if (name == "graphics") {
-               features.push_back("graphicx");
-               features.push_back("graphics");
-       } else
-               features.push_back(name);
+       features.push_back(name);
 }
 
 
-void LaTeXFeatures::useLayout(std::vector<bool>::size_type const & idx)
+void LaTeXFeatures::useLayout(vector<bool>::size_type const & idx)
 {
        layout[idx] = true;
 }
@@ -61,9 +60,9 @@ void LaTeXFeatures::useLayout(std::vector<bool>::size_type const & idx)
 
 bool LaTeXFeatures::isRequired(string const & name) const
 {
-       FeaturesList::const_iterator i = std::find(features.begin(), 
-                                                  features.end(),
-                                                  name);
+       FeaturesList::const_iterator i = find(features.begin(), 
+                                             features.end(),
+                                             name);
        return i != features.end();
 }
 
@@ -205,17 +204,6 @@ string const LaTeXFeatures::getPackages() const
                                 << "]{graphicx}\n";
        }
 
-       // INSET_GRAPHICS: remove this when InsetFig is thrown.
-       // graphics.sty
-       if (isRequired("graphics") && params.graphicsDriver != "none") {
-               if (params.graphicsDriver == "default")
-                       packages << "\\usepackage{graphics}\n";
-               else
-                       packages << "\\usepackage[" 
-                                << params.graphicsDriver
-                                << "]{graphics}\n";
-       }
-
        //if (algorithm) {
        //      packages << "\\usepackage{algorithm}\n";
        //}
@@ -348,10 +336,6 @@ string const LaTeXFeatures::getTClassPreamble() const
                }
        }
 
-       // DEC's implementation of ostringstream has a bug which can be
-       // overcome with this forcing.
-       tcpreamble.seekp(std::ios::beg);
-
        return tcpreamble.str().c_str();
 }      
 
@@ -378,7 +362,7 @@ string const LaTeXFeatures::getIncludedFiles(string const & fname) const
        for (FileMap::const_iterator fi = IncludedFiles.begin();
             fi != end; ++fi)
                sgmlpreamble << "\n<!ENTITY " << fi->first
-                            << (IsSGMLFilename(fi->second) ? " SYSTEM \"" : " \"" )
+                            << (IsSGMLFilename(fi->second) ? " SYSTEM \"" : " \"")
                             << MakeRelPath(fi->second, basename) << "\">";
 
        return sgmlpreamble.str().c_str();
@@ -399,7 +383,7 @@ BufferParams const & LaTeXFeatures::bufferParams() const
        return params;
 }
 
-void LaTeXFeatures::getFloatDefinitions(std::ostream & os) const
+void LaTeXFeatures::getFloatDefinitions(ostream & os) const
 {
        // Here we will output the code to create the needed float styles.
        // We will try to do this as minimal as possible.