Re: Literal blocks within Option Lists (for man pages)
Guenter Milde <[email protected]>
| Newsgroups | gmane.text.docutils.user |
|---|---|
| Message-ID | <[email protected]> |
On 2016-05-07, Thomas Adam wrote:
> Hi all,
> I'm writing a man page using RST and have come across a situation I can't
> solve. I have an option block, and within it, I'd like to have a part of the
> text block indented. To achieve that, I've done the following:
><RST TEXT>
> -l, --color-limit limit
> Line1.
> Line2.
> Line3.
> ::
> Indented line 1.
> Indented line 2.
> Indented line 3.
> Indented line 4.
> Indented line 5.
> Indented line 6.
></RST TEXT>
The indentation of a literal block is a layout setting, not an intrinsic
feature.
For indented text, the simplest representation would be a block-quote.
If line-breaks are to be kept a line-block::
-l, --color-limit limit
Pragraph 1
Indented block
| line 1
| line 2
Only if you really want "literal" text (no markup parsing, teletype font),
use the literal block.
> This all works fine, and the indented lines are rendered as I'd expect them
> to. However, I also have further lines which are part of the description for
> the '-l' option. However, those lines are not indented at the same level as
> lines "Line1", "Line2", etc.
> Here's the code as I've written it including the additional text:
><RST TEXT>
-l, --color-limit limit
Line1.
Line2.
Line3.
::
Indented line 1.
Indented line 2.
Indented line 3.
Indented line 4.
Indented line 5.
Indented line 6.
More lines 1.
More lines 2.
More lines 3.
></RST TEXT>
> However, the rest of the text ("More lines 1", etc.) isn't aligned at
> the same level as "Line1". Instead, they're flush left to the screen,
> which isn't something I'd expect.
I cannot reproduce. Here, I get
* lines in the "normal paragraphs" merged
* paragraphs "line1 ... line3" and "More lines 1 ... 3" aligned
in the HTML output.
rst2html (Docutils 0.13 [repository], Python 2.7.11+, on linux2)
Maybe there is something in your original source but missing in the minimal
example?
Günter
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Docutils-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/docutils-users
Please use "Reply All" to reply to the list.