From: Georg Baum Date: Tue, 26 Jan 2016 20:33:46 +0000 (+0100) Subject: Fix regression of 0bf8b8a1 (bug 9884) X-Git-Tag: 2.2.0beta1~68 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=4ab1d77577fe746eb9ff9920a1b443977581ad3e;p=features.git Fix regression of 0bf8b8a1 (bug 9884) 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. --- diff --git a/lib/doc/LaTeXConfig.lyx b/lib/doc/LaTeXConfig.lyx index ec0de6f9bf..638ea77647 100644 --- a/lib/doc/LaTeXConfig.lyx +++ b/lib/doc/LaTeXConfig.lyx @@ -69,6 +69,7 @@ \html_be_strict true \html_latex_start \html_latex_end +\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 a69fd5971d..4fa2c82941 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")) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 0c5feb0cf2..734d18a81c 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -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"); } }