]> git.lyx.org Git - features.git/commitdiff
Fix footnotes in table with RevTeX4
authorJuergen Spitzmueller <spitz@lyx.org>
Wed, 27 Dec 2017 14:43:40 +0000 (15:43 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Thu, 28 Dec 2017 09:07:56 +0000 (10:07 +0100)
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
lib/layouts/revtex4.layout
src/insets/InsetFoot.cpp

index eec1c2050ab158496d94c2ca809f48dee7bb75be..cfdbd285799817c04cf8989d3855d40e7cafc785 100644 (file)
@@ -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
index 6fb09327e0773d6cc6e781ca03c493c89652bf4a..c4b902d0fd508826d35793be458df5a48da071ab 100644 (file)
@@ -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
index db7e1ac3314181d7c8aa3c411cec13d1ae67c161..1c3862635e105d59c710cbc3cdc3df575c565403 100644 (file)
@@ -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{"