From: Bram G. <br...@br...> - 2016-04-05 16:28:09
|
The pseudoxml writer shows that the intention of your RST code is correctly parsed: > <enumerated_list enumtype="arabic" prefix="" suffix="."> > <list_item> > <line_block> > <line> > First line > <line> > Second line > <line> > Third line > <list_item> > <paragraph> > Item with only one line > <list_item> > <paragraph> > Another item This is what the RST "really means". How it gets turned into HTML/LaTeX is subjective; you can use many stylesheets or even HTML trees for HTML, and many document types for LaTeX. You might need to configure/tweak either writer for your purposes. Cheers, Bram On Tue, 5 Apr 2016, at 04:35 PM, Guenter Milde wrote: > On 2016-04-05, <Ste...@te...> wrote: > > > [-- Type: text/plain, Encoding: quoted-printable --] > > > Hi all, > > > Is there a markup in reStructuredText, that forces a line break only, > > and is not interpreted as a block quote with indentation like line block? > > > I would like to force line breaks in a numerated list. > > > #. | First line > > | Second line > > | Third line > > #. Item with only one line > > #. Another item > > > Looking at restructuredText examples and the rtd theme, the line block > > markup seems to be expected to be rendered with a left margin in html, > > while it does not produce a margin with latex. > > As a consequence, the first item will be indented by 24px and the one line > > Items are not indented. > > In my setup, the line-block in a list is not indented further but aligns > with the following item. Did you try your markup? Do you already use a > custom CSS? > > > > Is there an alternative markup, or do I have to customise the css? > > There is nothing like :: > > #. First line <br> > Second line <br> > Third line <br> > #. Item with only one line > > > You can, however write paragraphs, say: > > #. First line > > Second line > > Third line > > #. Item with only one line > > > With the html5 writer (in the development version of Docutils) you can > remove spacing between the paragraphs and list items whith the class > value > "compact" for the list: > > .. class:: compact > > #. First line > > Second line > > Third line > > #. Item with only one line > > > The following works in most browsers but does not validate (<style> is > only > allowed in the document head):: > > .. raw:: html > > <style type="text/css"><!-- > li div.line-block { > margin-left: 0px; > color: red; /* for testing */ > } > --></style> > > > hope this helps, > > Günter > > > ------------------------------------------------------------------------------ > _______________________________________________ > Docutils-users mailing list > Doc...@li... > https://lists.sourceforge.net/lists/listinfo/docutils-users > > Please use "Reply All" to reply to the list. |