Giter VIP home page Giter VIP logo

Comments (3)

beastaugh avatar beastaugh commented on May 18, 2024

Your suggested HTML is invalid: span elements are not allowed to contain block-level elements like paragraphs.

from pandoc.

jgm avatar jgm commented on May 18, 2024

That's interesting. Is supported by anything
other than the princexml formatter?

One reservation I have is this. Footnotes in pandoc can contain block
elements. (E.g. you could have a footnote with two paragraphs, a bullet
list, and a code block.) HTML elements are not supposed to
contain block-level elements like

. I don't think I want pandoc to
produce invalid HTML.

John

+++ lrayb [May 05 11 06:29 ]:

Hello John,

Perhaps you may consider adding a css footnotes option to the HTML writer?

The princexml formatter converts (X)HTML or XML to PDF using CSS paged media.
All footnote related processing is done via the formatter and CSS. All that is required in the
HTML, is an inline span with class "footnote" containing the actual footnote content, as below:

... figure with a caption.<span class="footnote"><p>This feature is not yet implemented for RTF, OpenDocument, or ODT. In those formats, you'll just get an image in a paragraph by itself, with no caption.</p></span> (In LaTeX ...

This implies that the HTML writer insert the footnote content, as a span in the document, where the footnote number should appear.
The reference links, backlinks, and list of footnotes at the document end, become superfluous.

It would be really neat if you could add an option to pandoc to accomplish this, perhaps:
pandoc --css-footnote

Currently, I run a script to change my HTML output prior to producing the PDF.
I think only princexml supports this, (other browers likely won't) so it's hardly a priority, but would
be greatly appreciated.

Thank you for all your structured procrastination on pandoc, it makes my life much easier.
Regards
Laurence R Buchanan

from pandoc.

lrayb avatar lrayb commented on May 18, 2024

Hello John,
I clearly did not think that one through.
Using a span would suffice only for the simplest examples, without producing invalid markup against a strict DTD.

The recommended method, as per Mike Day, in this post, footnotes containing paragraphs, is to use divs.

<div>some text <div class="footnote">
<p>text 1</p>
<p>text 2</p>
</div> some more text.</div>

That approach would imply bigger changes to the HTML writer than I envisaged.

AFAIK, princexml is the only formatter which implements footnotes as per the css3 generated content for paged media module working draft.

I've left the issue open, should you have further thoughts, but I agree, pandoc should not produce any invalid markup.
Thank you very much for taking a look.

Laurence.

from pandoc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.