在图形指令中断开标题

问题描述 投票:0回答:1

如何打破图形指令中的长标题?我尝试了行块,但标题完全消失了。

.. figure:: a.png
   :width: 200

   | First line
   | second line.
restructuredtext
1个回答
0
投票

如果您不想要明确的断点,而只是将标题换行以使其与图像很好地匹配,您可以指定 :figwidth: 选项并让浏览器为您进行换行:

.. figure:: a.png
   :width: 200
   :figwidth: 200

   A long figure caption that should
   wrap in the output.
© www.soinside.com 2019 - 2024. All rights reserved.