- else if (t.cs() == "caption" || t.cs() == "captionabove" ||
- t.cs() == "captionbelow") {
- if (starred)
- p.get_token();
- p.skip_spaces();
- context.check_layout(os);
- p.skip_spaces();
- if (starred && t.cs() == "caption")
- begin_inset(os, "Caption LongTableNoNumber\n");
- else if (t.cs() == "caption")
- begin_inset(os, "Caption Standard\n");
- else if (t.cs() == "captionabove")
- begin_inset(os, "Caption Above\n");
- else if (t.cs() == "captionbelow")
- begin_inset(os, "Caption Below\n");
- Context newcontext(true, context.textclass, 0, 0, context.font);
- newcontext.check_layout(os);
- // FIXME InsetArgument is now properly implemented in InsetLayout
- // (for captions, but also for others)
- if (p.next_token().cat() != catEscape &&
- p.next_token().character() == '[') {
- p.get_token(); // eat '['
- begin_inset(os, "Argument 1\n");
- os << "status collapsed\n";
- parse_text_in_inset(p, os, FLAG_BRACK_LAST, outer, context);
- end_inset(os);
- eat_whitespace(p, os, context, false);
- }
- parse_text(p, os, FLAG_ITEM, outer, context);
- context.check_end_layout(os);
- // We don't need really a new paragraph, but
- // we must make sure that the next item gets a \begin_layout.
- context.new_paragraph(os);
- end_inset(os);
- p.skip_spaces();
- newcontext.check_end_layout(os);
- }
-