docbook / xslTNG

DocBook xslTNG Stylesheets
https://xsltng.docbook.org
MIT License
41 stars 20 forks source link

Footnote not supported in print stylesheet #419

Closed frank-steimke closed 8 months ago

frank-steimke commented 8 months ago

I have checked with the simple DocBook article in the samples directory from the xslTNG Distribution. Footnotes work as expected and produce a html footer element when i use thedocbook.xsl stylesheet.

But when i use the print.xsl stylesheet instead for the same document, no footer is produced. The footnotes content appears where the footnote element was placed in the source. This happens outside of Oxygen with Stylesheet Version 2.1.9.

Greetings, Frank

ndw commented 8 months ago

What processor are you using for paged media? The print stylesheets aren't intended for "ordinary" presentation in the browser, they're intended for processors that support CSS paged media, for example Antenna House or Prince XML.

I don't recall if support for bottom-of-the-page footnotes is a CSS standard these days or an extension supported by those processors.

I'm happy to try to support additional processors where it's practical. (I remain surprised that there isn't broader interest in open source paged media processors for CSS.)

frank-steimke commented 8 months ago

We are using Antenna House.

I am sure its not an matter of the CSS processor. Inspecting the generated HTML i can see that there is something wrong when we use the print.xsl stylesheet.

ndw commented 8 months ago

Can you provide a small sample document, the HTML that your transformation generates, and the corresponding PDF?

I just tried the footnote.001.pdf test document in the repository (transformed with Antenna House). The resulting HTML does have the footnotes embedded where they occur in the source, but that's the behavior I expect. The paged media processor is responsible for making them appear at the bottom of the page. (The XSLT transformation has no idea where page breaks will occur; leaving footnotes where they occur in the source allows the paged media processor to determine what page they should appear on.)

frank-steimke commented 8 months ago

Ah, i see. That means that the HTML File which has ben generated by the print.xsl stylesheet look awfully wrong in the browser, but will be rendered correct by the CSS processor.

Sorry for false alarm. We produce PDF in two steps: a) generate the HTML File, b) use the AH Formatter to produce PDF from HTML. When i saw the HTML File produced by print.xsl, with the footnotes content in the middle of the text where the footnote is placed, i was sure that something is wrong. Especially when i compared with the result of the HTML file produced from docbook.xsl.

It did not occur to me to check this with the AH Formatter.

Thanks for the explanation. I will close this Issue.

Greetings, Frank