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.14k stars 500 forks source link

AsciiDoc formatted table cells do not follow theme's grid color #2088

Closed tchjunky closed 2 years ago

tchjunky commented 2 years ago

In some recent update in the asciidoctor-pdf main branch, the table grid color around AsciiDoc formatted table cells is no longer consistent with regular table cell grid color of the same table.

For example, the AsciiDoc syntax below produces the following screenshot as output, where the a| cell is surrounded by a darker grid color. This example uses the default asciidoctor-pdf theme, but the problem also appears when a custom grid color is defined.

It would be great to have AsciiDoc formatted table cells use the same grid color as the rest of the table (as was the case several weeks ago).

= Table Example

*Simple Table*

[cols="50%,50%",options="header"]
|===
|Column 1
|Column 2

|Row 1 left
|Row 1 right

|Row 2 left
|Row 2 right

|Row 3 left
|Row 3 right
|===

*Table with AsciiDoc Formatted Cell*

[cols="50%,50%",options="header"]
|===
|Column 1
|Column 2

|Row 1 left
|Row 1 right

|Row 2 left
a|AsciiDoc formatted cell

* List bullet
* List bullet

|Row 3 left
|Row 3 right
|===

image

mojavelinux commented 2 years ago

It would be great to have AsciiDoc formatted table cells use the same grid color as the rest of the table

That is certainly the intended behavior.

I'm not able to reproduce this problem using either 2.0.0.alpha.1 or the code from the main branch. I have tried it using both the default theme and a custom theme, and I don't get the result you shared in either case.

What code are you running? If you are using code from git and, if so, are you sure that you have fetched all updates cleanly? Can you share the relevant sections of the custom theme file you are using? Can you share a project that reproduces the problem in isolation?

mojavelinux commented 2 years ago

Please reopen if you can provide a reproducible example. As far as I can tell, this is not an issue with the code as it stands right now.

tchjunky commented 2 years ago

Just to close the loop on this one, it seems I was using an older dependency in my Gemfile. I replaced:

gem 'prawn-table', github: 'prawnpdf/prawn-table', branch: 'HEAD'

with:

gem 'prawn', github: 'prawnpdf/prawn', branch: 'HEAD'

and the table output is back to normal. Or maybe it was just resetting the Ruby packages that did the trick. But it's working again.

Thanks!

mojavelinux commented 2 years ago

Thank you for following up and sharing that diagnostic information.

I have even better news for you. You can remove the prawn-table gem declaration entirely. We have moved the patch for it into Asciidoctor PDF so that you no longer need to declare it. And you don't need to declare prawn as a dependency either.

I'll add this point to the release notes.