- TextClass const & textclass = buf.params().getTextClass();
- Paragraph & par = it.paragraph();
- LayoutPtr const & layout = par.layout();
- Counters & counters = textclass.counters();
-
- if (par.params().startOfAppendix()) {
- // FIXME: only the counter corresponding to toplevel
- // sectionning should be reset
- counters.reset();
- counters.appendix(true);
- }
- par.params().appendix(counters.appendix());
-
- // Compute the item depth of the paragraph
- par.itemdepth = getItemDepth(it);
-
- if (layout->margintype == MARGIN_MANUAL) {
- if (par.params().labelWidthString().empty())
- par.params().labelWidthString(par.translateIfPossible(layout->labelstring(), buf.params()));
- } else {
- par.params().labelWidthString(docstring());
- }
-
- switch(layout->labeltype) {
- case LABEL_COUNTER:
- if (layout->toclevel <= buf.params().secnumdepth
- && (layout->latextype != LATEX_ENVIRONMENT
- || isFirstInSequence(it.pit(), it.plist()))) {
- counters.step(layout->counter);
- par.params().labelString(
- par.expandLabel(layout, buf.params()));
- } else
- par.params().labelString(docstring());
- break;
-
- case LABEL_ITEMIZE: {
- // At some point of time we should do something more
- // clever here, like:
- // par.params().labelString(
- // buf.params().user_defined_bullet(par.itemdepth).getText());
- // for now, use a simple hardcoded label
- docstring itemlabel;
- switch (par.itemdepth) {
- case 0:
- itemlabel = char_type(0x2022);
- break;
- case 1:
- itemlabel = char_type(0x2013);
- break;
- case 2:
- itemlabel = char_type(0x2217);
- break;
- case 3:
- itemlabel = char_type(0x2219); // or 0x00b7
- break;