I have Sphinx text in the following format in source code:
Line 1 Line 2 Line 3 Line 4
I would like Line 4 to be rendered in HTML on a separate physical line. Is this possible?
Use line blocks:
| Line 1
| Line 2
| Line 3
| Line 4
Will produce:
Line 1
Line 2
Line 3
Line 4
The solutions user14678546 and Paebbels also work for tables:
Using line blocks in tables is inconstant, not pretty, as well as it leaves a blank/additional line break at the end, resulting in ex. 3 lines but only the first 2 lines have text.
Here is an example of a line break in a table of reStructuredText (only for html):
.. table:: Truth table for "not"
:width: 20%
:widths: 1 3 1
===== ===== =====
A not A Note
===== ===== =====
False True Text here
True False Comment here
False
False True Text here |br| line break in table here
True False
===== ===== =====
.. |br| raw:: html
<br>
Using |br|
inline in text in a table, results in a line brake in a single cell of text (in html): Table with line break
It also works for csv tables.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With