如何在第一个强制换行/换行?我不希望它是一个新段落(即行之间没有额外的空格),我只想让文本从一个新行开始.谢谢!
根据docutils raw
角色的文档,您可以这样做:
If there just *has* to be a line break here, :raw-html:`
` it can be accomplished with a "raw"-derived role. But the line block syntax should be considered first.
并且如此所述,首先考虑行块语法.
.. role:: raw-html(raw) :format: html
该行块语法也工作过,是有点清洁:
| This is a line
| This is another line
| Another new line
我们在global.rst文件中添加了替换,因此我们不必一直添加原始标签。
.. |br| raw:: html
这样我们就可以使用| br | 当我们需要换行时。