asciidoctor / asciidoctor-pdf

:page_with_curl: Asciidoctor PDF: A native PDF converter for AsciiDoc based on Asciidoctor and Prawn, written entirely in Ruby.
https://docs.asciidoctor.org/pdf-converter/latest/
MIT License
1.13k stars 500 forks source link

prose_margin_inner has no effect on prose in table cells #2518

Closed Mutantpenguin closed 2 months ago

Mutantpenguin commented 2 months ago

prose_margin_inner should work inside table cells, or table cells should support setting their own inner margin for prose.

Example doc:

= Title LVL 1
:doctype: book
:data-uri: {docdir}
:pdf-theme: theme.yml

== Title LVL 2

This is a text.

This is another text.

[%unbreakable%header,cols="1,2"]
|===

|Col 1
|Col 2

|a small text with one line
|
This is a text.

This is another text.

|===

Example theme:

extends: default-sans-with-font-fallbacks
prose:
  margin:
    inner: 60

Screenshot

image

mojavelinux commented 2 months ago

That's correct. Paragraphs in a normal table cell are always separated by an empty line rather than a margin. The gap is the height of one line. These paragraphs do not behave exactly like paragraph blocks and never have. I'll add this to the documentation.

If you need to control the spacing between paragraph in a table cell, you need to make the cell an AsciiDoc table cell by adding the "a" style. Then, the spacing between the paragraphs can be controlled using the prose-margin-inner theme key.