From 196032f79f73e852385d6a14b1d42cd10c99ce96 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Wed, 27 Dec 2017 15:43:40 +0100 Subject: [PATCH] Fix footnotes in table with RevTeX4 These classes come with their own working implementation of table footnotes, so we are not supposed to use the tablefootnote or footnote package. Also add missing outliner name. (cherry picked from commit dfaa4e9466fd0e5bf22bf55965a26e86a767cfa7) --- lib/layouts/revtex4-1.layout | 12 ++++++++++++ lib/layouts/revtex4.layout | 9 +++++++++ src/insets/InsetFoot.cpp | 5 ++++- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/lib/layouts/revtex4-1.layout b/lib/layouts/revtex4-1.layout index eec1c2050a..cfdbd28579 100644 --- a/lib/layouts/revtex4-1.layout +++ b/lib/layouts/revtex4-1.layout @@ -23,6 +23,9 @@ Input numrevtex.inc Provides natbib-internal 1 Provides url 1 +Provides tablefootnote 1 +Provides footnote-alternative 1 + SecNumDepth 4 TocDepth 3 DefaultStyle Standard @@ -286,6 +289,9 @@ Float End +OutlinerName video "Videos" + + InsetLayout Flex:Float_Link CopyStyle Flex:URL LabelString "Float link" @@ -349,6 +355,12 @@ InsetLayout Flex:Surname End +# RevTeX uses normal footnotes in tables +InsetLayout Foot:InFloatTable + CopyStyle Foot +End + + NoStyle Chapter NoStyle Chapter* NoStyle LyX-Code diff --git a/lib/layouts/revtex4.layout b/lib/layouts/revtex4.layout index 6fb09327e0..c4b902d0fd 100644 --- a/lib/layouts/revtex4.layout +++ b/lib/layouts/revtex4.layout @@ -16,8 +16,11 @@ Format 65 Columns 1 Sides 1 PageStyle Headers + Provides natbib-internal 1 Provides url 1 +Provides tablefootnote 1 +Provides footnote-alternative 1 SecNumDepth 4 TocDepth 3 @@ -277,5 +280,11 @@ Style Keywords End +# RevTeX uses normal footnotes in tables +InsetLayout Foot:InFloatTable + CopyStyle Foot +End + + Input stdfloats.inc Input stdcounters.inc diff --git a/src/insets/InsetFoot.cpp b/src/insets/InsetFoot.cpp index db7e1ac331..1c3862635e 100644 --- a/src/insets/InsetFoot.cpp +++ b/src/insets/InsetFoot.cpp @@ -118,7 +118,10 @@ int InsetFoot::docbook(odocstream & os, OutputParams const & runparams) const void InsetFoot::validate(LaTeXFeatures & features) const { - if (!features.saveNoteEnv().empty()) { + // Use footnote package to provide footnotes in tables + // unless an alternative approach is built in the class. + if (!features.saveNoteEnv().empty() + && !features.isProvided("footnote-alternative")) { features.require("footnote"); features.addPreambleSnippet( from_ascii("\\makesavenoteenv{" -- 2.39.5