using std::endl;
-LaTeXFeatures::LaTeXFeatures(BufferParams const & p, int n)
+LaTeXFeatures::LaTeXFeatures(BufferParams const & p, LyXTextClass::size_type n)
: layout(n, false), params(p)
{
// packages
array = false;
color = false;
graphics = false; // INSET_GRAPHICS: remove this when InsetFig is thrown.
- graphicx = false;
+ graphicx = false;
setspace = false;
makeidx = false;
verbatim = false;
NeedLyXMinipageIndent = false;
}
-void LaTeXFeatures::require(string const & name) {
+
+void LaTeXFeatures::require(string const & name)
+{
if (name == "array") {
array = true;
} else if (name == "color") {
}
}
-string LaTeXFeatures::getPackages()
+
+string const LaTeXFeatures::getPackages()
{
string packages;
LyXTextClass const & tclass =
// makeidx.sty
if (makeidx) {
if (! tclass.provides(LyXTextClass::makeidx)
- && params.language != "french") // french provides
- // \index !
+ && params.language->babel() != "french") // french provides
+ // \index !
packages += "\\usepackage{makeidx}\n";
packages += "\\makeindex\n";
}
+ params.graphicsDriver + "]{graphicx}\n";
}
- // INSET_GRAPHICS: remove this when InsetFig is thrown.
+ // INSET_GRAPHICS: remove this when InsetFig is thrown.
// graphics.sty
if (graphics && params.graphicsDriver != "none") {
if (params.graphicsDriver == "default")
packages += "\\doublespacing\n";
break;
case Spacing::Other:
-#ifdef HAVE_SSTREAM
std::ostringstream value;
-#else
- char val[30];
- ostrstream value(val, 30);
-
-#endif
value << params.spacing.getValue(); // setw?
-#ifdef HAVE_SSTREAM
packages += string("\\setstretch{")
+ value.str().c_str() + "}\n";
-#else
- value << '\0';
- packages += string("\\setstretch{")
- + value.str() + "}\n";
-#endif
break;
}
}
-string LaTeXFeatures::getMacros()
+string const LaTeXFeatures::getMacros()
{
string macros;
}
-string LaTeXFeatures::getTClassPreamble()
+string const LaTeXFeatures::getTClassPreamble()
{
// the text class specific preamble
LyXTextClass const & tclass =
}
-string LaTeXFeatures::getIncludedFiles()
+string const LaTeXFeatures::getIncludedFiles()
{
string sgmlpreamble;
-
- for(FileMap::const_iterator fi=IncludedFiles.begin(); fi != IncludedFiles.end(); ++fi)
- sgmlpreamble += "\n<!entity " + fi->first + " system \"" + fi->second + "\">";
+ FileMap::const_iterator end = IncludedFiles.end();
+ for(FileMap::const_iterator fi=IncludedFiles.begin(); fi != end; ++fi)
+ sgmlpreamble += "\n<!entity " + fi->first
+ + " system \"" + fi->second + "\">";
return sgmlpreamble;
}