Skip to content

Instantly share code, notes, and snippets.

@jessepav
jessepav / 00-Process-HTML-CSS-Footnotes.md
Last active January 23, 2021 19:18
Ant Task for Using Pandoc Block-Level Footnotes in CSS Paged Media (i.e. HTML/CSS → PDF conversion)

<process-footnotes> Task

The motivation for this task is to allow block-level elements within footnote content for use with CSS paged media (eg. transforming HTML to PDF with Prince or Antenna House Formatter). Or more explicitly, to automatically process Pandoc-generated HTML – which can include block-level footnote content – so that it can be converted to PDF with proper footnotes.

The basic problem is this: CSS paged media footnotes are created by adding the float: footnote property to an element, at which point it will be moved out of the normal flow