// -*- C++ -*-
/* This file is part of
- * ======================================================
+ * ======================================================
*
* LyX, The Document Processor
*
* Copyright 1995 Matthias Ettrich
- * Copyright 1995-1999 the LyX Team.
+ * Copyright 1995-2000 the LyX Team.
*
* ====================================================== */
#include "bufferparams.h"
#include "layout.h"
-extern LyXRC * lyxrc;
LaTeXFeatures::LaTeXFeatures(int n)
: layout(n, false)
// color.sty
if (color) {
if (params.graphicsDriver == "default")
- packages +="\\usepackage{color}\n";
+ packages += "\\usepackage{color}\n";
else
packages += "\\usepackage["
+ params.graphicsDriver + "]{color}\n";
packages += "\\doublespacing\n";
break;
case Spacing::Other:
- char value[30];
- sprintf(value, "%.2f", params.spacing.getValue());
+ //char value[30];
+ //sprintf(value, "%.2f", params.spacing.getValue());
+#ifdef HAVE_SSTREAM
+ ostringstream value;
+#else
+ char val[30];
+ ostrstream value(val, 30);
+
+#endif
+ value << params.spacing.getValue(); // setw?
+#ifdef HAVE_SSTREAM
packages += string("\\setstretch{")
- + value + "}\n";
+ + value.str().c_str() + "}\n";
+#else
+ value << '\0';
+ packages += string("\\setstretch{")
+ + value.str() + "}\n";
+#endif
break;
}
}
-void LaTeXFeatures::showStruct(BufferParams & params) {
+void LaTeXFeatures::showStruct(BufferParams const & params) {
lyxerr << "LyX needs the following commands when LaTeXing:"
// packs
<< "\n***** Packages:" << getPackages(params)