Verbatim Text in Doxia APT Table

488 views Asked by At

Using Doxia APT format, I would like to include verbatim text or a snippet within a table.

*------------+----------------------------+
|| col1      || col2                      |
*------------+----------------------------+
| some text  | VERBATIM TEXT OR SNIPPET   |
*------------+----------------------------+

However, since doxia verbatim text and macros both must be non-indented, and the table requires preceding markup, I'm not sure if there is an easy way to accomplish this.

To be more specific, I am using Maven 3 to generate site documentation with apt documents. I would like to include multi-line JSON representations in a table column.

As a workaround, each line is monospaced and several of the json characters must be escaped, which is not easy to read or maintain (although the rendered page appears fine). For example:

*------------+----------------------------+
|| col1      || col2                      |
*------------+----------------------------+
| some text  | <<<\{>>>\                  |
|            | <<<\ "id":"12345",>>>\     |
|            | <<<\ "name":"value">>>\    |
|            | <<<\}>>>                   |
*------------+----------------------------+

Ideally, in order to maintain readability of the table, I would prefer to use a doxia snippet or similar macro to dynamically insert the code, but could also use verbatim text. For example, I would like to be able to do something like the following, which isn't valid:

*------------+-----------------------------+
|| col1      || col2                       |
*------------+-----------------------------+
| some text  | %{snippet|url=example.json} |
*------------+-----------------------------+

Is there any way to accomplish this?

0

There are 0 answers