有什么方法可以在 python-docx 中的 table 中添加副标题吗?
Is there any way to add a subheading to a table in python-docx?
声明:我已尝试从 JSON 文件生成 table 并希望它自动为副标题编号。
有什么方法可以使段落标题下的 table 自动编号?我是否应该对 table.style
做些什么?
这是我想要的输出:
我希望它自动将 table 标题编号为“3 第三章”下方的“3.1”。
对于任何语法错误,我们深表歉意。提前谢谢你。
styleParagraph = document.add_paragraph("Hello it me")
styleParagraph.style = 'Heading 1'
声明:我已尝试从 JSON 文件生成 table 并希望它自动为副标题编号。
有什么方法可以使段落标题下的 table 自动编号?我是否应该对 table.style
做些什么?
这是我想要的输出:
我希望它自动将 table 标题编号为“3 第三章”下方的“3.1”。
对于任何语法错误,我们深表歉意。提前谢谢你。
styleParagraph = document.add_paragraph("Hello it me")
styleParagraph.style = 'Heading 1'