]> 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>
Sun, 19 Nov 2017 09:41:17 +0000 (10:41 +0100)
Fixes: #9387
src/Paragraph.cpp

index 4a83d932678a1572c7a1aa0734d58aaf54acb1be..80bfe3decd733f328e2a9f456fa5c5ed894fb0d3 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 &&