#endif
#include "Spacing.h"
+#include "LString.h"
using std::ios;
using std::ostream;
float Spacing::getValue() const
{
switch(space) {
+ case Default: // nothing special should happen with this...
case Single: return 1.0;
case Onehalf: return 1.25;
case Double: return 1.667;
}
-void Spacing::writeFile(ostream & os) const
+void Spacing::writeFile(ostream & os, bool para) const
{
+ if (space == Default) return;
+
+ string cmd = para ? "\\paragraph_spacing " : "\\spacing ";
+
if (getSpace() == Spacing::Other) {
os.setf(ios::showpoint|ios::fixed);
os.precision(2);
- os << "\\spacing " << spacing_string[getSpace()]
+ os << cmd << spacing_string[getSpace()]
<< " " << getValue() << " \n";
} else {
- os << "\\spacing " << spacing_string[getSpace()] << " \n";
+ os << cmd << spacing_string[getSpace()] << " \n";
}
}