diff --git a/lib/layouts/lilypond.module b/lib/layouts/lilypond.module index b4978bda1b..6c98f14b45 100644 --- a/lib/layouts/lilypond.module +++ b/lib/layouts/lilypond.module @@ -45,6 +45,7 @@ InsetLayout "Flex:LilyPond" LabelFont Color foreground EndFont + DocBookTag IGNORE EndArgument DocBookNotInPara true DocBookWrapperTag mediaobject diff --git a/src/insets/InsetLayout.cpp b/src/insets/InsetLayout.cpp index b6056cd098..769a77402b 100644 --- a/src/insets/InsetLayout.cpp +++ b/src/insets/InsetLayout.cpp @@ -107,6 +107,9 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass, IL_DOCBOOKITEMWRAPPERTAG, IL_DOCBOOKITEMWRAPPERTAGTYPE, IL_DOCBOOKITEMWRAPPERATTR, + IL_DOCBOOKINNERTAG, + IL_DOCBOOKINNERTAGTYPE, + IL_DOCBOOKINNERATTR, IL_DOCBOOKNOFONTINSIDE, IL_INTOC, IL_ISTOCCAPTION, @@ -156,6 +159,9 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass, { "docbookargumentbeforemaintag", IL_DOCBOOKARGUMENTBEFOREMAINTAG }, { "docbookattr", IL_DOCBOOKATTR }, { "docbookininfo", IL_DOCBOOKININFO }, + { "docbookinnerattr", IL_DOCBOOKINNERATTR }, + { "docbookinnertag", IL_DOCBOOKINNERTAG }, + { "docbookinnertagtype", IL_DOCBOOKINNERTAGTYPE }, { "docbookitemattr", IL_DOCBOOKITEMATTR }, { "docbookitemtag", IL_DOCBOOKITEMTAG }, { "docbookitemtagtype", IL_DOCBOOKITEMTAGTYPE }, @@ -521,6 +527,15 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass, case IL_DOCBOOKTAGTYPE: lex >> docbooktagtype_; break; + case IL_DOCBOOKINNERTAG: + lex >> docbookinnertag_; + break; + case IL_DOCBOOKINNERATTR: + lex >> docbookinnerattr_; + break; + case IL_DOCBOOKINNERTAGTYPE: + lex >> docbookinnertagtype_; + break; case IL_DOCBOOKININFO: lex >> docbookininfo_; break; @@ -714,6 +729,14 @@ std::string InsetLayout::docbooktagtype() const } +std::string InsetLayout::docbookinnertagtype() const +{ + if (docbookinnertagtype_ != "block" && docbookinnertagtype_ != "paragraph" && docbookinnertagtype_ != "inline") + docbookinnertagtype_ = "block"; + return docbookinnertagtype_; +} + + std::string InsetLayout::docbookwrappertagtype() const { if (docbookwrappertagtype_ != "block" && docbookwrappertagtype_ != "paragraph" && docbookwrappertagtype_ != "inline") diff --git a/src/insets/InsetLayout.h b/src/insets/InsetLayout.h index b48fde7f0a..da003a95b0 100644 --- a/src/insets/InsetLayout.h +++ b/src/insets/InsetLayout.h @@ -156,6 +156,12 @@ public: /// std::string docbookattr() const { return docbookattr_; } /// + std::string docbookinnertag() const { return docbookinnertag_; } + /// + std::string docbookinnertagtype() const; + /// + std::string docbookinnerattr() const { return docbookinnerattr_; } + /// std::string const & docbookininfo() const; /// bool docbooksection() const { return docbooksection_; } @@ -319,6 +325,12 @@ private: /// std::string docbookattr_; /// + std::string docbookinnertag_; + /// + mutable std::string docbookinnertagtype_; + /// + std::string docbookinnerattr_; + /// mutable std::string docbookininfo_; /// bool docbooknotinpara_ = false; diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 95d55b765b..635a83f7f7 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -686,6 +686,9 @@ void InsetText::docbook(XMLStream & xs, OutputParams const & rp, XHTMLOptions op attrs += from_ascii(" xlink:href=\"") + text_.asString() + from_ascii("\""); xml::openTag(xs, il.docbooktag(), attrs, il.docbooktagtype()); } + + if (!il.docbookinnertag().empty() && il.docbookinnertag() != "NONE" && il.docbookinnertag() != "IGNORE") + xml::openTag(xs, il.docbookinnertag(), il.docbookinnerattr(), il.docbookinnertagtype()); } // - Think about the arguments before the paragraph. @@ -733,6 +736,9 @@ void InsetText::docbook(XMLStream & xs, OutputParams const & rp, XHTMLOptions op if (!il.docbookitemwrappertag().empty() && il.docbookitemwrappertag() != "NONE" && il.docbookitemwrappertag() != "IGNORE") xml::closeTag(xs, il.docbookitemwrappertag(), il.docbookitemwrappertagtype()); + if (!il.docbookinnertag().empty() && il.docbookinnertag() != "NONE" && il.docbookinnertag() != "IGNORE") + xml::closeTag(xs, il.docbookinnertag(), il.docbookinnertagtype()); + if (!il.docbooktag().empty() && il.docbooktag() != "NONE" && il.docbooktag() != "IGNORE") xml::closeTag(xs, il.docbooktag(), il.docbooktagtype());