X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetText.cpp;h=10b15c88edad34abd39a31fb90b9223ff2700e91;hb=48b1e8a0aca2f3f3faa8f1f800568e47792ba9a0;hp=7f881f708acc39b94ba08107fb19d003339ed55d;hpb=3883b85f49054c109cb8a9a293721a5e41edb68d;p=lyx.git diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 7f881f708a..10b15c88ed 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -591,7 +591,7 @@ int InsetText::plaintext(odocstringstream & os, void InsetText::docbook(XMLStream & xs, OutputParams const & rp) const { - docbook(xs, rp, WriteEverything); + docbook(xs, rp, WriteEverything); } @@ -612,13 +612,13 @@ void InsetText::docbook(XMLStream & xs, OutputParams const & rp, XHTMLOptions op InsetLayout const & il = getLayout(); if (opts & WriteOuterTag && !il.docbooktag().empty() && il.docbooktag() != "NONE") { - docstring attrs = docstring(); - if (!il.docbookattr().empty()) - attrs += from_ascii(il.docbookattr()); - if (il.docbooktag() == "link") - attrs += from_ascii(" xlink:href=\"") + text_.asString() + from_ascii("\""); - xs << xml::StartTag(il.docbooktag(), attrs); - } + docstring attrs = docstring(); + if (!il.docbookattr().empty()) + attrs += from_ascii(il.docbookattr()); + if (il.docbooktag() == "link") + attrs += from_ascii(" xlink:href=\"") + text_.asString() + from_ascii("\""); + xs << xml::StartTag(il.docbooktag(), attrs); + } // No need for labels that are generated from counters. @@ -873,6 +873,14 @@ void InsetText::updateBuffer(ParIterator const & it, UpdateType utype, bool cons // 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: