asciidoctor / asciidoctor-pdf

:page_with_curl: Asciidoctor PDF: A native PDF converter for AsciiDoc based on Asciidoctor and Prawn, written entirely in Ruby.
https://docs.asciidoctor.org/pdf-converter/latest/
MIT License
1.14k stars 501 forks source link

included file inside table cell doesn't render footnotes #2410

Closed philip-stuckey closed 1 year ago

philip-stuckey commented 1 year ago

hello, I have a fairly complicated document, and I tried putting two subsections in a two column format by putting them in a table, but I found the footnotes in the subsections disappeared. I have narrowed it down to this minimum-working example. Everything in the block comment is supposed to be a separate file that the first one is including

[cols="1a"]
|===
|include::separate-document.adoc[]
|this seems to work fine{empty}footnote:[this footnote shows up]
|===

in separate-document.adoc

when this file is included, the footnote is nowhere to be seen
footnote:[this footnote should appear in the including document, so here it should show up twice]

here are the results image

see how the first footnote at the bottom is "[2]"? when I ran this in normal asciidoctor the footnotes appear in the bottom of their respective cells as opposed to the bottom of the page. note that this is in asciidoctor-pdf version 2.3.4 using asciidoctor 2.0.18

philip-stuckey commented 1 year ago

seems related to https://github.com/asciidoctor/asciidoctor-pdf/issues/1777 except the footnote isn't rendered only if it's included from another document

mojavelinux commented 1 year ago

The include directive is a red herring here. This happens with or without the include. For some reason, the first footnote is being dropped. I'm investigating.

mojavelinux commented 1 year ago

(Note to self) Apply this fix to main, then backport to the 2.3.x branch.