AntennaHouse / pdf5-ml

Antenna House PDF5-ML DITA-OT Plug-in
23 stars 9 forks source link

Question: What is the best way to keep a table row from breaking across a page? #174

Closed steinbacher01 closed 4 years ago

steinbacher01 commented 4 years ago

One of our writers identified a table row that was breaking across a page, separating descriptive text from an image.

RowPageBreak

I found this answer in a stackoverflow question:

"You should use keep-together.within-column="always" instead."

https://stackoverflow.com/questions/13932261/is-there-an-alternative-to-keep-together-always-on-table-row

But I also noticed this comment in default_style.xml:

atsRow

Why is this dangerous? Can you suggest a better way to keep a row together within a page if possible?

Thanks,

Leroy Steinbacher

ToshihikoMakita commented 4 years ago

If table row contents does not fit page height, keep-together.within-column="always" causes page overflow. This is why I didn't apply it.

If you prefer:

Please test the second answer by Tony Graham from Stackoverflow.

<attribute-set name="atsRow">
     <!-- Keep will be applied when row fits page height. If it does not fit row will be divided into two pages. -->
     <attribute name="keep-together.within-column">10</attribute>
</attribute-set>

Regards,

steinbacher01 commented 4 years ago

Thank you for the response. This is very helpful.