How to use a non-default table column separator in Asciidoc

As a brief note, if you ever need to use a different column separator when creating a table in Asciidoc, you can do so by specific the separator field in the table preamble.

For example, in the following Asciidoc table I can’t use the default pipe character | to separate the table columns, because I need to use that character in the content inside the table, so I set the separator character to be : instead:

<<methods_to_combine_cmds>> lists the ...

.Methods to combine external commands
[[methods_to_combine_cmds]]
[cols=",",options="header",separator=:,]
|===============================
:Methods :Description
:`cmd1 #| cmd2`  :The output of the first ...
:`cmd1 ### cmd2` :`cmd1` and `cmd2` will be ...
:`cmd1 #> cmd2`  :Normally used to write to ...
:`cmd1 #&& cmd2` :Run `cmd2` if `cmd1` runs ...
:`cmd1 #|| cmd2` :Run `cmd2` if `cmd1` ...
:`cmd1 #&& cmd2 #|| cmd3` :Run `cmd2` is ...
|===============================

I shortened that content so you don’t have to read through all the non-essential text, but the image shows the actual resulting Asciidoc table.

For more information, this asciidoctor.org URL was the most helpful resource for me. This other page shows how you can specify format="csv" to create a table from a CSV-style syntax.

In summary, if you needed to see how to create an Asciidoc table with a non-default table column separator, I hope this example is helpful.

Photo D8
How to use a non-default table column separator in Asciidoc