+bool TextClass::readCiteEngine(Lexer & lexrc)
+{
+ int const type = readCiteEngineType(lexrc);
+ if (type & ENGINE_TYPE_AUTHORYEAR)
+ cite_styles_[ENGINE_TYPE_AUTHORYEAR].clear();
+ if (type & ENGINE_TYPE_NUMERICAL)
+ cite_styles_[ENGINE_TYPE_NUMERICAL].clear();
+ string def;
+ bool getout = false;
+ while (!getout && lexrc.isOK()) {
+ lexrc.eatLine();
+ def = lexrc.getString();
+ def = subst(def, " ", "");
+ def = subst(def, "\t", "");
+ if (compare_ascii_no_case(def, "end") == 0) {
+ getout = true;
+ continue;
+ }
+ string cmd;
+ CitationStyle cs;
+ char ichar = def[0];
+ if (ichar == '#')
+ continue;
+ if (ichar == 'C') {
+ cs.forceUpperCase = true;
+ def[0] = 'c';
+ }
+
+ size_t const n = def.size();
+ for (size_t i = 0; i != n; ++i) {
+ ichar = def[i];
+ if (ichar == '*')
+ cs.fullAuthorList = true;
+ else if (ichar == '[' && cs.textAfter)
+ cs.textBefore = true;
+ else if (ichar == '[')
+ cs.textAfter = true;
+ else if (ichar != ']')
+ cmd += ichar;
+ }
+
+ cs.cmd = cmd;
+ if (type & ENGINE_TYPE_AUTHORYEAR)
+ cite_styles_[ENGINE_TYPE_AUTHORYEAR].push_back(cs);
+ if (type & ENGINE_TYPE_NUMERICAL)
+ cite_styles_[ENGINE_TYPE_NUMERICAL].push_back(cs);
+ }
+ return getout;
+}
+
+
+int TextClass::readCiteEngineType(Lexer & lexrc) const