Table cell centered text issue

Post here questions and problems related to editing and publishing DITA content.
Eric Mui
Posts: 1
Joined: Thu Feb 13, 2025 6:48 am

Table cell centered text issue

Post by Eric Mui »

I'm trying to center text in tbody cells. So I added <xsl:attribute name="text-align"></xsl:attribute> to the attribute set "tbody.row.entry__content" in tables-attr.xsl.

I'm writing in Chinese. If the text in a table cell is longer for one line to hold, it will be in two lines. The thing is, the second line will always be a bit to the right than the first line, such as:

测试测试测试
(two spaces here)测试测试测试

If the text is generated into multiple lines, only the last line is a bit to the right compared to other lines, such as:

测试测试测试
测试测试测试
测试测试测试
(two spaces here)测试测试测试

Can anyone help? Thank!