Comments (7)
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.
Please provide a reproducible AsciiDoc sample that can be used to demonstrate this issue on a separate machine.
from asciidoctor-pdf.
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.
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.
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.
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.
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)
- Lock ttfunk to 1.7.x in 2.3.x release line HOT 2
- Producer set to Author instead of producing software in document properties HOT 3
- Document exceptions to the nobreak role and non-breaking characters HOT 6
- Add support for SVG to image reference in SVG encoded as a data URI (SVG data loader) HOT 1
- Alternative to prawn-gmagick? HOT 3
- asciidoctor: WARNING: unknown unordered list style: something HOT 2
- A custom title page HOT 1
- Add theme support for indent for admonition and sidebar HOT 1
- prose_margin_inner has no effect on prose in table cells HOT 1
- line break in theme attribute "with_email" not working any more HOT 2
- Don't hyphenate autolink when hyphenation is enabled
- add log messages from document HOT 1
- Arrows not shown in BPMN diagrams HOT 5
- Add see and see-also entries on index term to generated index
- Watermark (foreground image) is always left-aligned on landscape pages HOT 6
- Missing callout numbers and admonition images if PDF is opened with Adobe acrobat reader HOT 2
- Incorrectly Formatted Content by Column When Spanning Rows HOT 2
- Customise nested elements in a theme HOT 1
- Remove dependency on ostruct HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asciidoctor-pdf.