Table caption numbering for Appendix

Post here questions and problems related to editing and publishing DITA content.
joyceclc23
Posts: 10
Joined: Wed Aug 06, 2025 9:31 am

Table caption numbering for Appendix

Post by joyceclc23 »

Hi
How to change my Table caption numbering for Appendix section to Table A.1 or A-1?
However, the numbering A-1 shows up in my List of Tables . Did i miss out something?
image.png
image.png
You do not have the required permissions to view the files attached to this post.
julien_lacour
Posts: 703
Joined: Wed Oct 16, 2019 3:47 pm

Re: Table caption numbering for Appendix

Post by julien_lacour »

Hello,

You're right, table and figures in appendix doesn't follow numbering rules, however you can simply fix this by adding the following rules in a custom CSS stylesheet:

Code: Select all

*[class ~= "map/map"][numbering ^= 'deep-chapter-scope'] *[class ~= "topic/topic"][topicrefclass ~= "bookmap/appendix"] *[class ~= "topic/table"] > caption > .table--title-label:after {
  content: " " counter(chapter, upper-latin) "-" counter(tablecount) " ";
}
*[class ~= "map/map"][numbering ^= 'deep-chapter-scope'] *[class ~= "topic/topic"][topicrefclass ~= "bookmap/appendix"] *[class ~= "topic/fig"] > figcaption > .fig--title-label:after {
  content: " " counter(chapter, upper-latin) "-" counter(figcount) " ";
}
I added an issue in our tracking system to add these rules in the default stylesheets.

Regards,
Julien
joyceclc23
Posts: 10
Joined: Wed Aug 06, 2025 9:31 am

Re: Table caption numbering for Appendix

Post by joyceclc23 »

Thank you for this solution :)
Post Reply