#include "TextClass.h"
#include "Lexer.h"
#include "Font.h"
-#include "support/debug.h"
-
+#include "support/debug.h"
#include "support/lstrings.h"
#include <ostream>
LT_ALIGNPOSSIBLE,
LT_MARGIN,
LT_BOTTOMSEP,
+ LT_CATEGORY,
LT_COMMANDDEPTH,
LT_COPYSTYLE,
LT_DEPENDSON,
{ "align", LT_ALIGN },
{ "alignpossible", LT_ALIGNPOSSIBLE },
{ "bottomsep", LT_BOTTOMSEP },
+ { "category", LT_CATEGORY },
{ "commanddepth", LT_COMMANDDEPTH },
{ "copystyle", LT_COPYSTYLE },
{ "dependson", LT_DEPENDSON },
finished = true;
break;
+ case LT_CATEGORY:
+ if (lexrc.next())
+ category_ = lexrc.getDocString();
+ break;
+
case LT_COPYSTYLE: // initialize with a known style
if (lexrc.next()) {
docstring const style = subst(lexrc.getDocString(),
<< to_utf8(style) << "'\n"
<< "All layouts so far:"
<< endl;
- TextClass::const_iterator it =
- tclass.begin();
- TextClass::const_iterator end =
- tclass.end();
- for (; it != end; ++it) {
- lyxerr << to_utf8((*it)->name())
- << endl;
- }
+ DocumentClass::const_iterator lit = tclass.begin();
+ DocumentClass::const_iterator len = tclass.end();
+ for (; lit != len; ++lit)
+ lyxerr << to_utf8((*lit)->name()) << endl;
//lexrc.printError("Cannot copy known "
// "style `$$Token'");
break;
case LT_REQUIRES:
- if (lexrc.eatLine())
- requires_ = getVectorFromString(lexrc.getString());
+ lexrc.eatLine();
+ vector<string> const req =
+ getVectorFromString(lexrc.getString());
+ requires_.insert(req.begin(), req.end());
break;
}
}
lexrc.popTable();
- return error;
+ return !error;
}