最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

add a style to a specific table element in AsciiDoc (PDF Conversion) - Stack Overflow

programmeradmin0浏览0评论

I have an asciiDoc file with several tables and one of them need a specific styling. So far i have this working :

[cols="10%,^30%,^30%,^30%", option="header"]
|===
| {empty} s| Rédaction s| Vérification s| Approbation

| Nom | Auteur | |
| Date | {docdate} | |
| Visa | OK | |
|===

but i'd like to change this table text size and to style the header row. I tried to add a role to this table without success. So far the only way of styling the header is to set a global style to all tables in my theme.yml :

table:
  head:
    background-color: #555555

Is there a way to style a specific table (which is correctly rendered when converted to PDF ?)

Thanks for help :)

I have an asciiDoc file with several tables and one of them need a specific styling. So far i have this working :

[cols="10%,^30%,^30%,^30%", option="header"]
|===
| {empty} s| Rédaction s| Vérification s| Approbation

| Nom | Auteur | |
| Date | {docdate} | |
| Visa | OK | |
|===

but i'd like to change this table text size and to style the header row. I tried to add a role to this table without success. So far the only way of styling the header is to set a global style to all tables in my theme.yml :

table:
  head:
    background-color: #555555

Is there a way to style a specific table (which is correctly rendered when converted to PDF ?)

Thanks for help :)

Share Improve this question asked Mar 13 at 10:42 UsulUsul 12810 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Asciidoctor PDF currently only supports custom roles for styling paragraphs and phrases. If you need to add a role to a table and have that role affect the table style, you must create an extended converter that applies the style appropriately. Fortunately, there is an example in the documentation.

发布评论

评论列表(0)

  1. 暂无评论