tabstyle

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

tabstyle

metro
I am looking at providing different table styles in pdf output. docbook allows this using tabstyle.

Is there a generic way to define tabstyle from asciidoc source? I have only  found horizontal tables to impact tabstyle.

Thanks,

MT
--
Reply | Threaded
Open this post in threaded view
|

Re: tabstyle

mojavelinux
Administrator
Customizations like this should be done using a combination of roles (which become CSS classes) and a custom stylesheet. For instance, let's say you want to create an pricing table.

[.pricing,grid=all,frame=topbot,width=auto]
|===
|Standard
|1 Database
|5GB Storage
|20 Users
|===

That gives you:

[source,html]
----
<table class="tableblock frame-topbot grid-all pricing">
<colgroup>
<col style="width: 100%;">
</colgroup>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Standard</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">1 Database</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">5GB Storage</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">20 Users</p></td>
</tr>
</tbody>
</table>
----

You can then use CSS to style that using my custom stylesheet or styles add via a docinfo file.

Cheers,

-Dan

On Tue, Aug 12, 2014 at 12:42 PM, metro [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I am looking at providing different table styles in pdf output. docbook allows this using tabstyle.

Is there a generic way to define tabstyle from asciidoc source? I have only  found horizontal tables to impact tabstyle.

Thanks,

MT
--


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/tabstyle-tp1984.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--