3

I would like to know how to add a caption to a table defined in a markdown file for Doxygen. I know that Doxygen can generate a table from the following code in a .md file, but I could not find a way to add a caption to this table.

|Name |Age|
|-----|---|
|Alice| 18|
|Bob  | 23|
Akira Okumura
  • 1,816
  • 2
  • 20
  • 41

1 Answers1

2

do you mean something like this, which is possible

###H6

|Header1 | Header2 | Header 3 |
|--------|---------|----------|
|0       | 1       | 7        |
|2       | 5       | 3        |
|9       | 7       | 2        |

or something like this, which is not possible, at least not by only using simple .md notation

|          Caption            |
|Header1 | Header2 | Header 3 |
|--------|---------|----------|
|0       | 1       | 7        |
|2       | 5       | 3        |
|9       | 7       | 2        |

if you want the second version you should use .html tables

Unfortunately the second is impossible in doxygen.

  1. you would need multimarkdown support, which is shown by the link the table example but is not supported by doxygen yet, right now doxygen only supports simple tables

  2. you use only html

  3. you find a workaround which suites you, something like this:

    <table>
    <tr>
    <td colspan=1>
         Caption
    </td>
    |Header1 | Header2 | Header 3 |
    |--------|---------|----------|
    |0       | 1       | 7        |
    |2       | 5       | 3        |
    |9       | 7       | 2        |
    </tr>
    

albert
  • 8,285
  • 3
  • 19
  • 32
aldr
  • 838
  • 2
  • 19
  • 33