3

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?

Ortomala Lokni
  • 56,620
  • 24
  • 188
  • 240
shelley
  • 7,206
  • 4
  • 36
  • 63
  • You may not have an answer to your question, but your detailed question has helped me correctly format some monospaced text in some Maven 3 site docs. Thanks for posting! – Stewart Jan 08 '13 at 12:32

0 Answers0