\end_deeper
\begin_layout Description
-\change_inserted -712698321 1514534780
+\change_inserted -712698321 1514539256
\begin_inset Flex Code
status collapsed
Includes a comma-separated list of layout names that should be nested in
and after the current one.
- Only makes sense for nestable layouts (such as environments)
+ Only makes sense for nestable layouts (such as environments).
+ Must be ended by
\begin_inset Quotes eld
\end_inset
\begin_inset Quotes erd
\end_inset
+.
+ See also
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1514539161
+IsAutoNestedBy
+\change_unchanged
+
+\end_layout
+
+\end_inset
+
.
\end_layout
\end_inset
global entries).
+\change_inserted -712698321 1514539171
+
+\end_layout
+
+\begin_layout Description
+
+\change_inserted -712698321 1514539282
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1514539190
+IsAutoNestedBy
+\end_layout
+
+\end_inset
+
+ Includes a comma-separated list of layout names after which this one should
+ be nested.
+ Only makes sense with regard to nestable layouts (such as environments).
+ Must be ended by
+\begin_inset Quotes eld
+\end_inset
+
+
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1514539279
+EndIsAutoNestedBy
+\end_layout
+
+\end_inset
+
+
+\begin_inset Quotes erd
+\end_inset
+
+.
+ See also
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1514539172
+AutoNest
+\end_layout
+
+\end_inset
+
+.
+\change_unchanged
+
\end_layout
\begin_layout Description
# Color collapsable -> collapsible
# Incremented to format 66, 28 December 2017 by spitz
-# New Layout tag "AutoNests ... EndAutoNests"
+# New Layout tags "AutoNests ... EndAutoNests" and
+# "IsAutoNestedBy ... EndIsAutoNestedBy"
# Do not forget to document format change in Customization
# Manual (section "Declaring a new text class").
LT_ALIGNPOSSIBLE,
LT_ARGUMENT,
LT_AUTONESTS,
+ LT_AUTONESTEDBY,
LT_MARGIN,
LT_BOTTOMSEP,
LT_CATEGORY,
{ "innertag", LT_INNERTAG },
{ "inpreamble", LT_INPREAMBLE },
{ "intitle", LT_INTITLE },
+ { "isautonestedby", LT_AUTONESTEDBY },
{ "istoccaption", LT_ISTOCCAPTION },
{ "itemcommand", LT_ITEMCOMMAND },
{ "itemsep", LT_ITEMSEP },
break;
}
+ case LT_AUTONESTEDBY: {
+ docstring const autonest =
+ subst(subst(subst(lex.getLongString(from_ascii("EndIsAutoNestedBy")),
+ from_ascii("\n"), docstring()),
+ from_ascii(" "), docstring()),
+ from_ascii("\t"), docstring());
+ vector<docstring> const autonests =
+ getVectorFromString(autonest);
+ autonested_by_.insert(autonests.begin(), autonests.end());
+ break;
+ }
+
case LT_REFPREFIX: {
docstring arg;
lex >> arg;
}
os << "\n\tEndAutoNests\n";
}
+ if (!autonested_by_.empty()) {
+ os << "\tIsAutoNestedBy\n\t";
+ for (set<docstring>::const_iterator it = autonested_by_.begin();
+ it != autonested_by_.end(); ++it) {
+ if (it != autonested_by_.begin())
+ os << ',';
+ os << to_utf8(*it);
+ }
+ os << "\n\tIsAutoNestedBy\n";
+ }
if (refprefix.empty())
os << "\tRefPrefix OFF\n";
else
///
std::set<docstring> const & autonests() const { return autonests_; }
///
+ std::set<docstring> const & isAutonestedBy() const { return autonested_by_; }
+ ///
std::string const & latexparam() const { return latexparam_; }
///
docstring leftdelim() const { return leftdelim_; }
std::set<std::string> requires_;
/// Layouts that are by default nested after this one
std::set<docstring> autonests_;
+ /// Layouts that by auto-nest this one
+ std::set<docstring> autonested_by_;
///
LaTeXArgMap latexargs_;
///
setLayout(cur, layout);
bool do_nest = false;
set<docstring> autonests;
+ set<docstring> autonested;
if (cur.pit() > 0) {
autonests = pars_[cur.pit() - 1].layout().autonests();
+ autonested = pars_[cur.pit()].layout().isAutonestedBy();
do_nest = !ignoreautonests;
}
- if (do_nest && autonests.find(layout) != autonests.end())
+ if (do_nest && (autonests.find(layout) != autonests.end()
+ || autonested.find(old_layout) != autonested.end()))
lyx::dispatch(FuncRequest(LFUN_DEPTH_INCREMENT));
}