Source code in CSV tables

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

Source code in CSV tables

mariocup
Hello,

I would like to include source code in tables. In standard tables it is working fine.

[cols="15s,85a"]
|====
| Name
| Comment

| name-1
| [source,c]
----
int main(void)
----
|====


[cols="15,85"]
|====
| Name
| Comment

| name-2
a|
[source,c]
----
int main(void)
----
|====

 Can I achieve the same output for CSV tables? I haven't figure out how to write CSV tables with Asciidoctor content.
Reply | Threaded
Open this post in threaded view
|

Re: Source code in CSV tables

mojavelinux
Administrator
Nope, only the PSV (pipe-separated values) format supports AsciiDoc table cells. But remember that you can change separator character using the separator attribute. To prevent collision with characters in the content, I recommend using the broken vertical bar:

[separator=¦]
|===

[source,c]
----
int main(void)
----
|===

-Dan

On Sat, Sep 17, 2016 at 4:16 PM, mariocup [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello,

I would like to include source code in tables. In standard tables it is working fine.

[cols="15s,85a"]
|====
| Name
| Comment

| name-1
| [source,c]
----
int main(void)
----
|====


[cols="15,85"]
|====
| Name
| Comment

| name-2
a|
[source,c]
----
int main(void)
----
|====

 Can I achieve the same output for CSV tables? I haven't figure out how to write CSV tables with Asciidoctor content.



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



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux