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

Table cell colours that were set from the source disappear in the PDF output #234

Closed
wolandscat opened this issue Jun 25, 2015 · 11 comments
Closed
Assignees
Milestone

Comments

@wolandscat
Copy link

The HTML output shows how the colouring should look; completely absent in the PDF.

Example of the adoc source of these tables here.

PDF output:
image

@mojavelinux
Copy link
Member

Did you mean to post an example?

@wolandscat
Copy link
Author

Updated with some examples.

@mojavelinux
Copy link
Member

This is related to #86. I don't think we should implement table cell colors that are manually set in the AsciiDoc source since it is very far from semantic content. Instead, this should be controlled by the theme. You can control the color of header rows and cells using the theme. (Actually, I'm not sure about header cells, but you should be able to control the color...if not we need to fix that).

You can see examples of using the theme to set header row colors in #214.

@mojavelinux
Copy link
Member

I filed #239 as a follow-up issue since I can see that we are not applying the table head styles to the head er cells.

@wolandscat
Copy link
Author

If we can set semantic styles for table cells in adoc source, it's easy for us to change our generator. We just need to a) know how to do it and b) have it generate the right outcome for both HTML and PDF.

@mojavelinux mojavelinux changed the title Table cell colours that were set from the source disappear in the PDF output. Table cell colours that were set from the source disappear in the PDF output Jun 27, 2015
@mojavelinux
Copy link
Member

See asciidoctor/asciidoctor#1338. For a generic solution, we have to agree on that first, then we can do something in Asciidoctor PDF.

Keep in mind we may be able to handle some of your use cases by realizing that we are trying to style header cells within the body (a built-in role). So perhaps a first step we can take is allowing the theme to control the style of these cells.

@mojavelinux mojavelinux modified the milestones: v1.5.0, future Jul 15, 2015
@mojavelinux
Copy link
Member

I'm going to create a more specific issue for that last point. See #272.

@schneefisch
Copy link

I would like to push the importance of this ticket up ;)

@ukazap
Copy link

ukazap commented Jun 25, 2018

Any news?

@mch
Copy link
Contributor

mch commented Aug 28, 2019

I have a use case that is not covered by having the theme control the color of the cells.

I am involved in migrating a risk matrix from a spreadsheet to asciidoctor. The risk matrix identifies risks in the software I work on, the severity and probability or each risk, and based on the severity and probability computes whether the risk is acceptable or not.

The severity, probability, and acceptance cells are all colored in the existing spreadsheet, and I'd like to be able to continue that because it calls attention to rows that need careful consideration.

The existing method of using {set:cellbgcolor:#FF0000} works for HTML5 output, but it's dropped in PDF output. Although I agree that this method is not ideal in many ways, I hope it's worth implementing something that results in the same behaviour as the HTML5 backend.

@mojavelinux
Copy link
Member

I'm fine with moving ahead with this, caveats in all. When AsciiDoc supports roles on cells, then we can come back and do it the right way later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants