]> git.lyx.org Git - features.git/commitdiff
Fix regression of 0bf8b8a1 (bug 9884)
authorGeorg Baum <baum@lyx.org>
Tue, 26 Jan 2016 20:33:46 +0000 (21:33 +0100)
committerGeorg Baum <baum@lyx.org>
Tue, 26 Jan 2016 20:33:46 +0000 (21:33 +0100)
Unfortunately the footmisc package does not work together with hyperref:
Before 0bf8b8a1, a footnote in a section title was created as a link in pdf
outpout, after 0bf8b8a1 ist was no link anymore. For now we revert to the old
code, and wait until the footmisc and hyperref packages are made compatible.

lib/doc/LaTeXConfig.lyx
src/LaTeXFeatures.cpp
src/Paragraph.cpp

index ec0de6f9bfd0e30cf6f403d70df6c211eec51187..638ea7764773a0b5b2374256b3cfe87b7e401d07 100644 (file)
@@ -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
index a69fd5971df16cd526488e71a5c160e80777b9fe..4fa2c829412aee1bb826b189f0fa9a836d3dffe7 100644 (file)
@@ -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"))
index 0c5feb0cf23a93082cfc2cc066bb3c37fd05ec1d..734d18a81c6574388f6eeb2d71236a6b6880c865 100644 (file)
@@ -1426,7 +1426,7 @@ void Paragraph::Private::validate(LaTeXFeatures & features) const
                        icit->inset->validate(features);
                        if (layout_->needprotect &&
                            icit->inset->lyxCode() == FOOT_CODE)
-                               features.require("footmisc");
+                               features.require("NeedLyXFootnoteCode");
                }
        }