Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AsciiDoc table cell styling not functioning in PDF output #445

Closed
royemmerich opened this issue May 17, 2016 · 2 comments
Closed

AsciiDoc table cell styling not functioning in PDF output #445

royemmerich opened this issue May 17, 2016 · 2 comments

Comments

@royemmerich
Copy link

royemmerich commented May 17, 2016

Version

$ asciidoctor-pdf -V
Asciidoctor PDF 1.5.0.alpha.11 using Asciidoctor 1.5.4 [http://asciidoctor.org]
Runtime Environment (ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin15]) (lc:UTF-8 fs:UTF-8 in:- ex:UTF-8)

My Wish

To insert an unordered list in the cell of a table in a PDF file.

The Problem

The table below is a direct copy from the code block example entitled:

Comparing cells using AsciiDoc styles and no AsciiDoc styles

from the asciidoc table cell formatting section of the Asciidoctor Manual.

[cols="2"]
|===

a|This cell is prefixed with an `a` so the following list is rendered with the AsciiDoc list element styles.

* List item 1
* List item 2
* List item 3
|This cell *is not* prefixed with an `a` so the following list is not rendered with the AsciiDoc list element styles.

* List item 1
* List item 2
* List item 3

a|This cell is prefixed with an `a` so the following paragraph is rendered with the `lead` style.

[.lead]
I am a paragraph styled with the lead attribute.
|This cell *is not* prefixed with an `a` so the following paragraph is not rendered with the `lead` style.

[.lead]
I am a paragraph styled with the lead attribute.

|===

When I generate the PDF the end result looks like this:
screen shot 2016-05-17 at 11 30 12

when it should look like this (screenshot from Asciidoctor manual):

screen shot 2016-05-17 at 11 32 16

@mojavelinux
Copy link
Member

This is a known limitation right now. See #6.

@mojavelinux
Copy link
Member

As I mention in #6, what we're going to need to do is implement a custom cell handler in Prawn. That's the only way we'll be able to delegate back into the converter so that the page calculations can be handled by Prawn.

@mojavelinux mojavelinux changed the title Asciidoc table cell styling not functioning in PDF output AsciiDoc table cell styling not functioning in PDF output Aug 8, 2016
@mojavelinux mojavelinux added this to the v1.5.0.alpha.14 milestone Dec 19, 2016
mojavelinux added a commit that referenced this issue Dec 20, 2016
…bles) (PR #707)

- use custom Cell implementation to support AsciiDoc table cells
- supports colspan, rowspan and vertical alignment
- works best if column is assigned an explicit (relative) width
- does not permit content that exceeds the height of one page
- extra padding from last block is added to bottom of cell
- does not (yet) inherit font properties from table cell

Also resolves duplicates #315, #445 and #358.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants