After I used my PDF viewer correctly I could finally reproduce the footnote 
regression introduced by http://www.lyx.org/trac/changeset/0bf8b8a1/lyxgit.

Unfortunately there are no other options to fix this regression than 
reverting 0bf8b8a1 or introducing preamble code before loading footmisc that 
prevents the unwanted interaction (I have not tried this, but I am pretty 
sure it would work). Of these two options the first one is clearly better, 
so I propose a partical reversion of 0bf8b8a1 (although I don't like that, 
but IMHO the regression is too sever to just live with it).

The attached patch fixes the regression, but keeps the general support for 
footmisc (which does not hurt if not used), so if someone wants to use this 
in a special module it would still be possible. OK to go in?


Georg
diff --git a/lib/doc/LaTeXConfig.lyx b/lib/doc/LaTeXConfig.lyx
index ec0de6f..638ea77 100644
--- a/lib/doc/LaTeXConfig.lyx
+++ b/lib/doc/LaTeXConfig.lyx
@@ -69,6 +69,7 @@
 \html_be_strict true
 \html_latex_start <span class='latex'>
 \html_latex_end </span>
+\author -195340706 "Georg Baum"
 \end_header
 
 \begin_body
@@ -7124,11 +7125,17 @@ macros/latex/contrib/supported/footmisc/footmisc.sty
 \end_layout
 
 \begin_layout Description
-Notes: The package 
+Notes: 
+\change_inserted -195340706 1453667335
+Currently unused
+\change_deleted -195340706 1453667337
+The package 
 \family sans
 footmisc 
 \family default
-is needed to support stable footnotes in chapter titles.
+is needed to support stable footnotes in chapter titles
+\change_unchanged
+.
 \end_layout
 
 \begin_layout Subsection
diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp
index a69fd59..4fa2c82 100644
--- a/src/LaTeXFeatures.cpp
+++ b/src/LaTeXFeatures.cpp
@@ -134,6 +134,24 @@ static docstring const paragraphleftindent_def = from_ascii(
 	"}\n"
 	"{\\end{list}}\n");
 
+static docstring const floatingfootnote_def = from_ascii(
+	"%% Special footnote code from the package 'stblftnt.sty'\n"
+	"%% Author: Robin Fairbairns -- Last revised Dec 13 1996\n"
+	"\\let\\SF@@footnote\\footnote\n"
+	"\\def\\footnote{\\ifx\\protect\\@typeset@protect\n"
+	"    \\expandafter\\SF@@footnote\n"
+	"  \\else\n"
+	"    \\expandafter\\SF@gobble@opt\n"
+	"  \\fi\n"
+	"}\n"
+	"\\expandafter\\def\\csname SF@gobble@opt \\endcsname{\\@ifnextchar[%]\n"
+	"  \\SF@gobble@twobracket\n"
+	"  \\@gobble\n"
+	"}\n"
+	"\\edef\\SF@gobble@opt{\\noexpand\\protect\n"
+	"  \\expandafter\\noexpand\\csname SF@gobble@opt \\endcsname}\n"
+	"\\def\\SF@gobble@twobracket[#1]#2{}\n");
+
 static docstring const binom_def = from_ascii(
 	"%% Binom macro for standard LaTeX users\n"
 	"\\newcommand{\\binom}[2]{{#1 \\choose #2}}\n");
@@ -1256,6 +1274,8 @@ docstring const LaTeXFeatures::getMacros() const
 	// other
 	if (mustProvide("ParagraphLeftIndent"))
 		macros << paragraphleftindent_def;
+	if (mustProvide("NeedLyXFootnoteCode"))
+		macros << floatingfootnote_def;
 
 	// some problems with tex->html converters
 	if (mustProvide("NeedTabularnewline"))

Reply via email to