Giter Club home page Giter Club logo

Comments (7)

mojavelinux avatar mojavelinux commented on September 27, 2024 1

Note that it will still be necessary to add either %breakable or %unbreakable on the table itself. The converter has no way of "seeing" a title, so it has to be affixed to the table for reasons described in the docs. But the explicit open block wrapper should not be necessary (once this is fixed). (In fact, what the converter is doing is automatically wrapping the table in an open block).

from asciidoctor-pdf.

mojavelinux avatar mojavelinux commented on September 27, 2024

Please provide a reproducible AsciiDoc sample that can be used to demonstrate this issue on a separate machine.

from asciidoctor-pdf.

pstueck avatar pstueck commented on September 27, 2024

2520.zip
forgot chapter 5 2520.zip

Was afraid, you’ll ask for that 😆 and here we go ... the samples should work as is with the default PDF theme (which is locally a tad bit modified, to better reflect the use case I’ve screen-shot above; in case you do want to reproduce exactestly, I can provide an extended theme with “Albert Sans” as the main font).

Personally I think “mha-auto”, 1.2.1 & 4.2.1 are the way to go. Them should just work without the additional wrapper, IMHO.
On the other hand, neither 2.2.1 nor 3.2.1 should ever happen (a table caption belongs more to the table than the heading, I’d say; even the “mha-default” results—heading-min-height-after not set—look more reasonable for those sections).

Chapter 5 resp. 5.2.1 shouldn’t happen either IMO … just because there’s not enough room for the table header and the first row, caption and table shouldn’t be separated.

from asciidoctor-pdf.

mojavelinux avatar mojavelinux commented on September 27, 2024

Aha, I see what's happening. The described behavior is what the converter is trying to do. However, when the converter converts the table in the scratch document, it is inadvertently removing the breakable or unbreakable option from the table. So when it goes to convert it a subsequent time (perhaps in another scratch document), the option is no longer there. I need to update the code to ensure it doesn't drop the option as a side effect of doing the rendering test.

from asciidoctor-pdf.

pstueck avatar pstueck commented on September 27, 2024

The converter has no way of "seeing" a title, so it has to be affixed to the table for reasons described in the docs.

I am not really sure, I am following … can you please point to the docs, you’re mentioning (surely been looking in the wrong place or not meticulously enough)?

And also … if the converter doesn’t know that a title belongs to a table, how does %unbreakable for the table itself fix that?
IMHO a table caption does belong to the table … and should even be repeated when a table is split across pages. 🤔

from asciidoctor-pdf.

mojavelinux avatar mojavelinux commented on September 27, 2024

I am not really sure, I am following … can you please point to the docs,

https://docs.asciidoctor.org/pdf-converter/latest/breakable-and-unbreakable/#table

how does %unbreakable for the table itself fix that?

Because internally the converter wraps the table with the caption in an unbreakable block. That's why breakable or unbreakable is always required on a table.

IMHO a table caption does belong to the table … and should even be repeated when a table is split across pages.

I get that, but we are limited by the underlying capabilities of the PDF generator...and this is the solution we came up with. We can't do any better for reasons cited in the docs.

To be clear, %breakable and %unbreakable will work directly on the table as described, even when heading-min-height-after: auto is set, once this bug is fixed. The fix is that the theme setting should not be changing the behavior (it is currently an unintended side effect of the logic for that theme setting).

(I know what fix needs to be made and I am preparing it).

from asciidoctor-pdf.

pstueck avatar pstueck commented on September 27, 2024

Thanks for the detailed explanation (and pointing me to the right doc-page … although I must admit: been there, read it … and—of course—forgot some details).

Looking forward to the next release with the fix.

from asciidoctor-pdf.

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.