Hello Guenter,

Thanks for your effort of teaching a newbie ...

2011/11/4 Guenter Milde <mi...@users.berlios.de>:
> In Docutils, lists are "paragraph like block level objects" and the
> content of a list item is always put in a paragraph (as the pseudoxml
> output of the example shows):

Where "content" means "text", i.e. the sublist is perceived as a
structuring element rather than an entity.  I see.  Paragraphs contain
only text.  OK.

> The relationship between the objects is defined in
> http://docutils.sourceforge.net/docs/ref/doctree.html#element-hierarchy

Very clear.  Thanks.

> The standard HTML writer omits the paragraph tags around list item content.
> (The html-strict writer is more consistent here and adjusts the CSS style
> sheet to get the compact/non-compact distinction.)

OK

> In LaTeX, text is not structured by putting it in a "paragraph object"
>
>  <p> first paragraph </p>
>  <p> second paragraph </p>
>
> (the \paragraph macro is actually a section heading).
> Rather a "paragraph separator" is used:
>
>  first paragraph
>  <new-paragraph/>
>  second paragraph

I've put some discussion of this, since it is too long for a list
email, on my blog: http://friedrichr.blogspot.com/.

> Hence, the question whether a list is an "instance" of a paragraph or should
> be embedded into one does not apply.

On the language level, I agree.  Although I do not see clearly how
you're able to draw this conclusion from what you've written before.

> BTW, in LaTeX, you can write both, lists that are separate from the
> context and lists that are "embedded" - depending on whether the \begin
> \end pair is offset from the pre/post text with blank lines.

That's a very good point indeed.

> In rst, embedded lists are not possible, the syntax requires blank lines
> around a list. (To embed a list in a paragraph, you need a "compound"
> directive.)

This is very true.  I saw from this why it is appropriate for rst to
see paragraphs as containing only text.

> Attention: AFAIK the "! important" feature is not supported by ePub. It
> might be better to list the relevant objects in the specifier (divided by
> ``,``), e.g. ::
>
> .first {
>  margin-top: 0 }
>
> .last, ol.simple.last, ul.simple.last, .with-subtitle {
>  margin-bottom: 0 }

OK.  I will pay attention.

>> P.S.: I was apparently too quick in believing that the <p> tag is
>> necessarily the only solution.  Although I still believe it is a more
>> elegant solution.  The browser can decide how much space to place, and
>> the stylesheet does not need to say ``1em`` explicitly.  I have put my
>> thoughts in a comprehensive form on
>> http://friedrichromstedt.github.com/lists1.html, with an example how
>> it could work out in terms of resulting HTML.
>
> IMV, not a good idea: what happens, if you decide to separate
> paragraphs by indentation like
>
> p {
>   margin-bottom: 0
> }
> p + p {
>   text-indent:1.5em;
>   margin-top:0
> }

I tried this, and it just does what the human brain expects it to do,
i.e., it is not acting on the bullets's indentation level.  It's just
looking as it should like, although it's still looking wrong.  But if
you accept your stylesheet as what you would like to get, it just does
what it should on the HTML level, with the exception that the <p> of
the second top-level item is separated as if it would be the first of
a series of paragraphs (since it's part of another <li>) - this is why
\item doesn't take an argument in LaTeX, but is rather a markup flag
like \par is, I believe.

Friedrich

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-dev@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to