From e2789b4c66f9e762fb826e6abc24d68e6c2086bb Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Tue, 11 Mar 2025 15:45:14 +0100 Subject: [PATCH] stylesheets: fix generation of footnotes There was two problems: - the sect1 template did not process the footnote - footnote processing needed to use a template matching footnote/para[1], but we had a template matching para at a higher precendence level. So: - call process.footnotes at the end of the sect1 template - Add a templates matching footnote/para[1] at the same import level as the template matching para (this just call the original template) We also add a priority 1 to the sect1 template in chunk-code.xsl, although it is not strictly necessary. This is what upstream recommends... --- stylesheets/lfs-xsl/chunk-master.xsl | 8 ++++++-- stylesheets/lfs-xsl/xhtml/lfs-mixed.xsl | 10 ++++++++++ stylesheets/lfs-xsl/xhtml/lfs-sections.xsl | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/stylesheets/lfs-xsl/chunk-master.xsl b/stylesheets/lfs-xsl/chunk-master.xsl index 029332162..b353e75ca 100644 --- a/stylesheets/lfs-xsl/chunk-master.xsl +++ b/stylesheets/lfs-xsl/chunk-master.xsl @@ -27,8 +27,12 @@ Prevent creation of dummy sect1 files used to emulate sub-chapters. The original template is in {docbook-xsl}/xhtml/chunk-code.xsl It also matches other sect* tags. The code for those tags are - unchanged. --> - + unchanged. Note that the priority attribute is not strictly + required, because the original template is less restrictive in + matching, so has less precedence. But in case the docbook dev + add a match="sect1" template in their chunk-code.xsl, then it will + be necessary!--> + diff --git a/stylesheets/lfs-xsl/xhtml/lfs-mixed.xsl b/stylesheets/lfs-xsl/xhtml/lfs-mixed.xsl index 59859c12e..d33cd4f12 100644 --- a/stylesheets/lfs-xsl/xhtml/lfs-mixed.xsl +++ b/stylesheets/lfs-xsl/xhtml/lfs-mixed.xsl @@ -43,6 +43,16 @@ + + + + + + diff --git a/stylesheets/lfs-xsl/xhtml/lfs-sections.xsl b/stylesheets/lfs-xsl/xhtml/lfs-sections.xsl index b13e5e11b..0ecfaa4f6 100644 --- a/stylesheets/lfs-xsl/xhtml/lfs-sections.xsl +++ b/stylesheets/lfs-xsl/xhtml/lfs-sections.xsl @@ -166,7 +166,7 @@ - +