Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force a new line in Sphinx text

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?

like image 756
Jonathan Avatar asked Jan 02 '19 04:01

Jonathan


2 Answers

Use line blocks:

| Line 1
| Line 2
| Line 3
| Line 4

Will produce:

Line 1
Line 2
Line 3
Line 4

like image 66
banderlog013 Avatar answered Oct 25 '22 03:10

banderlog013


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.

like image 37
Skynet Avatar answered Oct 25 '22 02:10

Skynet