4

I am trying to have a (simple) unordered list in a table cell in an Asciidoc document. I use asciidoctor.

I tried the following:

|===
| One | Two

| Foo
|
- Bar
- Baz
|===

But this results in the last cell having simply the text - Bar - Baz as a simple string, no list formatting. I would like it to be formatted as a list, on two lines, with a bullet on each line. Any idea?

Florent Georges
  • 2,190
  • 1
  • 15
  • 24

1 Answers1

4

The default style of a table cell accepts only inline markup. To insert block elements you could change the cell style to "AsciiDoc". See this document for details.

For example:

|===
| One | Two

| Foo
a|
- Bar
- Baz
|===

Word of caution: The contents of the cell is treated as a separate AsciiDoc document, so certain markup (such as footnotes) behave badly as they no longer belong to the main document.

waldyrious
  • 3,683
  • 4
  • 33
  • 41
Richard Smith
  • 45,711
  • 6
  • 82
  • 81
  • Thank you, this is indeed what I was looking for! Now these cells come with an extra blank space at the bottom (roughly the height of a text line,) but at least they have proper lists now :-) – Florent Georges Sep 11 '22 at 15:21