jelovirt / org.lwdita

LwDITA parser for DITA-OT
http://lwdita.org/
Apache License 2.0
25 stars 19 forks source link

Allow specifying the title of a table #226

Open raducoravu opened 4 months ago

raducoravu commented 4 months ago

There is a way to specify the titles of images and thus create figures for them: https://github.com/jelovirt/org.lwdita/wiki/Common-syntax#images For tables right now people need to write the title as a separate bold paragraph before the table. And it does not get converted to a table's title element. So if for example I use a bookmap to create a list of tables, all my tables defined in Markdown will not have titles as the titles are actually paragraphs placed above the tables and are not converted to table title elements.

michael-nok commented 3 months ago

You can actually do this already with DITA-OT, but it may not work in all scenarios.

You can specify the title as a [table title name] line as the last element in Markdown.

| Heading 1 | Heading 2 | Heading 3 |
| --------- | --------- | --------- |
| Content1A | Content1B | Content1C |
| Content2A | Content2B | Content2C |
[I am a Markdown table]
Heading 1 Heading 2 Heading 3
Content1A Content1B Content1C
Content2A Content2B Content2C

[I am a Markdown table]

raducoravu commented 3 months ago

@michael-nok wow, thanks, I had no idea one could do that.