From: Juergen Spitzmueller Date: Mon, 10 Aug 2020 06:54:56 +0000 (+0200) Subject: Consider nesting when checking whether an inset is in a title X-Git-Tag: 2.3.6~57 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=84360735823f6ada0417f61e7bd788f9a64ac05b;p=features.git Consider nesting when checking whether an inset is in a title Amends e2a29fe55686 No status entry needed. --- diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 358a377542..94f8c38c0c 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -796,6 +796,14 @@ void InsetText::updateBuffer(ParIterator const & it, UpdateType utype) // Record in this inset is embedded in a title layout // This is needed to decide when \maketitle is output. intitle_context_ = it.paragraph().layout().intitle; + // Also check embedding layouts + size_t const n = it.depth(); + for (size_t i = 0; i < n; ++i) { + if (it[i].paragraph().layout().intitle) { + intitle_context_ = true; + break; + } + } } else { DocumentClass const & tclass = buffer().masterBuffer()->params().documentClass(); // Note that we do not need to call: