Help with tables (predefined styles and text wrapping)

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

Help with tables (predefined styles and text wrapping)

rahim123
Hi there, I'm really enjoying asciidoc(tor), as it allows me to focus more on writing instead of messing around with styles.

The markup is generally intuitive, but for me the table formatting options feel very arcane. Is there any way I can define some sort of a named attribute or style to reference the table formatting options I usually choose? For example:
[%header%.^, cols="7*^.^"]

I'm also having trouble with a table header where I need to write a word in brackets like [This] . Asciidoctor is wrapping the closing bracket onto a new line. Here's the structure of the table:

.zzzzzzzzzzz zzzzzzzzz
====
[%header%.^, cols="7*^.^"]
|===
|[zzzzzzzzzz]| zíz | zzzz | zz éz/zzzzz|zz zzzzzzzz|zz zzz.|zz éz/zzzzz
|`zzzá` +
_(zzzzz)_|`zzzzz zzzáz`|`zzz zzzzíz`|`zz zzzzí`|`zz zzzzí`|`zzzzz zzzzí`|`zz zzzzí`
|`zzzz` +
_(zzz)_|`zzzzz zázzz`|`zzz zázzz`|`zz zzzé`|`zz zzzé`|`zzzzz zzzé`|`zz zzzé`
|`zzzáz` +
_(zzzzzzz)_|`zzzzz zzzzzzz`|`zzz zzzzzzzz`|`zz zzzzzzí`|`zz zzzzzzí`|`zzzzz zzzzzzí`|`zz zzzzzzí`
|===



Thanks for the help!
Reply | Threaded
Open this post in threaded view
|

Re: Help with tables (predefined styles and text wrapping)

mojavelinux
Administrator
No, there's no other way to specify column specs. That's how the language is. If we consider any change / improvement, it would be done through the AsciiDoc language project, which is getting underway.


> I'm also having trouble with a table header where I need to write a word in brackets like [This]

This happens because the version of prawn-table you are using is out of date. This is described in the README. See https://github.com/asciidoctor/asciidoctor-pdf#use-dev-versions

Best Regards,

-Dan

On Thu, Jan 7, 2021 at 11:49 AM rahim123 [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi there, I'm really enjoying asciidoc(tor), as it allows me to focus more on writing instead of messing around with styles.

The markup is generally intuitive, but for me the table formatting options feel very arcane. Is there any way I can define some sort of a named attribute or style to reference the table formatting options I usually choose? For example:
[%header%.^, cols="7*^.^"]

I'm also having trouble with a table header where I need to write a word in brackets like [This] . Asciidoctor is wrapping the closing bracket onto a new line. Here's the structure of the table:

.zzzzzzzzzzz zzzzzzzzz
====
[%header%.^, cols="7*^.^"]
|===
|[zzzzzzzzzz]| zíz | zzzz | zz éz/zzzzz|zz zzzzzzzz|zz zzz.|zz éz/zzzzz
|`zzzá` +
_(zzzzz)_|`zzzzz zzzáz`|`zzz zzzzíz`|`zz zzzzí`|`zz zzzzí`|`zzzzz zzzzí`|`zz zzzzí`
|`zzzz` +
_(zzz)_|`zzzzz zázzz`|`zzz zázzz`|`zz zzzé`|`zz zzzé`|`zzzzz zzzé`|`zz zzzé`
|`zzzáz` +
_(zzzzzzz)_|`zzzzz zzzzzzz`|`zzz zzzzzzzz`|`zz zzzzzzí`|`zz zzzzzzí`|`zzzzz zzzzzzí`|`zz zzzzzzí`
|===



Thanks for the help!


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/Help-with-tables-predefined-styles-and-text-wrapping-tp8440.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: Help with tables (predefined styles and text wrapping)

rahim123
Thanks a lot Dan! Take care.