Awesome Asciidoctor: Changing the Grid and Frame of Tables

We can change the frames and grid of tables we define in Asciidoctor. We use the frames attribute to change the outside frame of a table. We can choose between topbot for top and bottom, sides for only a frame at the sides of the table, none if we don’t want a frame. The default value all create a frame around our table with top, sides and bottom.

To change the inner grid of a table we use the grids table attribute. The default value all displays a grid for columns and rows inside the table. The value cols only displays a grid between columns, value rows display a grid between rows and with value none there will be no grid inside our table.

The following Asciidoc sample shows the definition of four tables with different values for the cols table attribute:

When we generate output using the HTML backend we get the following result:

In the next sample we have four tables with different values for the cols attribute:

And we get the following output when we transform this source to HTML:

Written with Asciidoctor 1.5.1.

Original article

This entry was posted in Asciidoc, Asciidoctor by mrhaki. Bookmark the permalink.

About mrhaki

My name is Hubert A. Klein Ikkink also known as mrhaki. I work at the great IT company JDriven. Here I work on projects with Groovy & Grails, Gradle and Spring. At JDriven we focus on SpringSource technologies. All colleagues want to learn new technologies, support craftmanship and are very eager to learn. This is truly a great environment to work in. You can contact me via Google+ or @mrhaki.

Leave a Reply

Your email address will not be published. Required fields are marked *