The following patch against 1.1.4fix2 fixes an obscure bug in the creation of
tex when the text contains footnotes with non-zero depth embeded inside
paragraphs with non-zero depths.
The old code worked 99% of the time because the depth of a dummy paragraph is
normally 0. To actually see the bug, you need to open the footnote, change some
layout and the undo. The undo action "restores" the depth of the dummy
paragraph to the "correct" depth and the bug appears.
I probably wouldn't have bothered to chase this bug if I didn't want to
understand footnotes better...
Please respond to my work email [EMAIL PROTECTED]
--- src/paragraph.C Thu Feb 3 20:18:11 2000
+++ ../../lyx-1.1.4/src/paragraph.C Tue Apr 11 21:11:59 2000
@@ -3632,7 +3632,10 @@
lyxerr[Debug::LATEX] << "TeXDeeper... " << this << endl;
LyXParagraph * par = this;
- while (par && par->depth == depth) {
+ while (par &&
+ par->depth == depth &&
+ par->footnoteflag == footnoteflag)
+ {
if (par->IsDummy())
lyxerr << "ERROR (LyXParagraph::TeXDeeper)" << endl;
if (textclasslist.Style(current_view->buffer()->params.textclass,
@@ -3883,7 +3886,8 @@
} while (par
&& par->layout == layout
&& par->depth == depth
- && par->pextra_type == pextra_type);
+ && par->pextra_type == pextra_type
+ && par->footnoteflag == footnoteflag);
if (style.isEnvironment()) {
file += "\\end{" + style.latexname() + '}';