}
+InsetLayout const * findInsetLayout(TextClass const & textclass, string const & name, bool command)
+{
+ DocumentClass::InsetLayouts::const_iterator it = textclass.insetLayouts().begin();
+ DocumentClass::InsetLayouts::const_iterator en = textclass.insetLayouts().end();
+ for (; it != en; ++it)
+ if (it->second.latexname() == name &&
+ ((command && it->second.latextype() == InsetLayout::COMMAND) ||
+ (!command && it->second.latextype() == InsetLayout::ENVIRONMENT)))
+ return &(it->second);
+ return 0;
+}
+
+
void eat_whitespace(Parser &, ostream &, Context &, bool);
Context & context)
{
Layout const * newlayout = 0;
+ InsetLayout const * newinsetlayout = 0;
// Store the latest bibliographystyle and nocite{*} option
// (needed for bibtex inset)
string btprint;
}
}
+ // The single '=' is meant here.
+ else if ((newinsetlayout = findInsetLayout(context.textclass, t.cs(), true))) {
+ p.skip_spaces();
+ context.check_layout(os);
+ begin_inset(os, "Flex ");
+ os << to_utf8(newinsetlayout->name()) << '\n'
+ << "status collapsed\n";
+ parse_text_in_inset(p, os, FLAG_ITEM, false, context);
+ end_inset(os);
+ }
+
else {
// try to see whether the string is in unicodesymbols
// Only use text mode commands, since we are in text mode here,