]> git.lyx.org Git - features.git/commitdiff
Fix footnote output in description item
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 19 Nov 2017 07:59:48 +0000 (08:59 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Mon, 20 Nov 2017 08:50:23 +0000 (09:50 +0100)
Fixes: #9387
(cherry picked from commit aaa61500896ef00087b146fd41ee88ea16dd0f1d)

src/Paragraph.cpp

index 6f514863de831fb780cfc3cfe027406bd92835e2..291881911bff5a7a4b7930b2028b3c3ddc6a266b 100644 (file)
@@ -1490,6 +1490,16 @@ void Paragraph::Private::validate(LaTeXFeatures & features) const
        for (; icit != iend; ++icit) {
                if (icit->inset) {
                        features.inDeletedInset(owner_->isDeleted(icit->pos));
+                       if (icit->inset->lyxCode() == FOOT_CODE) {
+                               // FIXME: an item inset would make things much easier.
+                               if ((layout_->latextype == LATEX_LIST_ENVIRONMENT
+                                    || (layout_->latextype == LATEX_ITEM_ENVIRONMENT
+                                        && layout_->margintype == MARGIN_FIRST_DYNAMIC))
+                                   && (icit->pos < begin_of_body_
+                                       || (icit->pos == begin_of_body_
+                                           && (icit->pos == 0 || text_[icit->pos - 1] != ' '))))
+                                       features.saveNoteEnv("description");
+                       }
                        icit->inset->validate(features);
                        features.inDeletedInset(false);
                        if (layout_->needprotect &&