min_toclevel_ = Layout::NOT_IN_TOC;
max_toclevel_ = Layout::NOT_IN_TOC;
- for (size_t i = 0; i != layoutCount(); ++i) {
- int const toclevel = layout(i)->toclevel;
+ DocumentClass::const_iterator lit = begin();
+ DocumentClass::const_iterator len = end();
+ for (; lit != len; ++lit) {
+ Layout const & lt = **lit;
+ int const toclevel = lt.toclevel;
if (toclevel != Layout::NOT_IN_TOC) {
if (min_toclevel_ == Layout::NOT_IN_TOC)
min_toclevel_ = toclevel;
style, name, listName, builtin);
floatlist_->newFloat(fl);
// each float has its own counter
- counters_->newCounter(from_ascii(type), from_ascii(within),
+ counters_->newCounter(from_ascii(type), from_ascii(within),
docstring(), docstring());
+ // also define sub-float counters
+ docstring const subtype = "sub-" + from_ascii(type);
+ counters_->newCounter(subtype, from_ascii(type),
+ "\\alph{" + subtype + "}", docstring());
}
lexrc.popTable();