如何在rst中强制换行/换行?我不希望它是一个新的段落(即。行之间没有额外的空格),我只想让文本从新行开始。谢谢!
发布于 2018-07-07 03:03:05
line block syntax也可以工作,而且更干净一些:
| This is a line | This is another line | Another new line
发布于 2018-07-06 04:37:00
根据docutils raw role的文档,您可以这样做:
If there just *has* to be a line break here,
:raw-html:`<br />`
it can be accomplished with a "raw"-derived role.
But the line block syntax should be considered first.您需要首先定义raw角色:
.. role:: raw-html(raw)
:format: html正如示例所述,首先考虑line block syntax。
| Lend us a couple of bob till Thursday.
| I'm absolutely skint.
| But I'm expecting a postal order and I can pay you back
as soon as it comes.
| Love, Ewan.发布于 2019-01-29 08:44:30
我们在global.rst文件中添加了一个替换,这样我们就不必一直添加原始标签了。
.. |br| raw:: html
<br/>这样,当我们需要换行符时,我们就可以使用|br|。
https://stackoverflow.com/questions/51198270
复制相似问题