Le 10/09/2014 13:05, Lex Trotman a écrit :
On 10 September 2014 08:43, Lex Trotman <[email protected]> wrote:
On 10 September 2014 08:01, Ondra Žižka <[email protected]> wrote:
Hi, could the <p> be removed from <li>? <li> is a block element and does not
need extra <p>. If something, why not put a neutral <div> in it? Thanks.
No, but you can use a custom xhtml11.conf containing only the relevant
construct to customise the output. List are slightly complicated, you
will need to read the user guide.
To expand further on why not:
1. there can be more than one paragraph inside a list item, so the <p>
is needed then. For consistency and so styling is easier and not
repeated, <p> is output for single paragraphs as well.
2. changing the elements that are output will mean that user CSS may
break since it would be common to style paragraphs inside list items
as I outlined in a previous post. A change of elements means this CSS
would no longer apply, and the default paragraph style would no longer
apply to content inside list items.
Cheers
Lex
Thanks Lex for this important clarification.
Multi-paragraph list items are tricky to get right (if possible at all)
in many markup languages.
This is shown in 17.7. List Item Continuation
<http://www.methods.co.nz/asciidoc/chunked/ch17.html#X15>: instead of a
blank line, put a line with a single plus sign.
The example there generates the following code the first list item:
<p>
List item one.
</p>
<div class="paragraph"><p>List item one continued with a second paragraph
followed by an
Indented block.</p></div>
<div class="literalblock">
<div class="content">
<pre><code>$ ls *.sh
$ mv *.sh ~/tmp</code></pre>
</div></div>
<div class="paragraph"><p>List item continued with a third paragraph.</p></div>
I'm surprised to see that the first is plain "<p>" but also some "<p>"
surrounded by "<div class="paragraph">".
(asciidoc 8.6.9 default package on Ubuntu 14.04, command line "asciidoc
myfilename.txt")
--
Stéphane Gourichon
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/asciidoc.
For more options, visit https://groups.google.com/d/optout.