csv-table 引用为表编号而不是表名称
我正在制作一个包含许多表格的文档。但是,我知道如何在文本中引用它们的唯一方法是使用 :ref:'my_table'
并将整个表名称“我的表的长标题”放入文本中堵塞。我宁愿把它放在“表 1.3”中......这可能吗?
.. _my_table:
.. csv-table:: The long title of my table
:file: my_table.csv
:header-rows: 1
一个单独但与表格相关的问题:是否有一个 sphinx/docutils 选项可以将表格名称/标题放在底部而不是顶部,或者是样式表/乳胶的东西?
I am making a document with many tables. But, the only way I know how to refer to them in the text is with a :ref:'my_table'
and that puts the entire table name, "The long title of my table" in my text block. I would rather have it put in "Table 1.3" instead ... is that possible?
.. _my_table:
.. csv-table:: The long title of my table
:file: my_table.csv
:header-rows: 1
A separate but table related questions: is there a sphinx/docutils option for putting the table name/caption at the bottom rather than the top or is that a stylesheet/latex thing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可能没有超级简单的方法可以做到这一点,但是 numfig 扩展(如这个问题)对图形做了非常类似的事情,并且可能进行修改/调整以对表格执行类似的操作。
像这样的自定义扩展可能是目前实现此目的的唯一方法。
There's probably not a super-easy way to do this, but the numfig extension (as referenced in this question) does something very like this for Figures, and could probably be modified/adapted to do something similar for Tables.
A custom extension like this is probably the only way to accomplish this at present.