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

>
> Cheers
> Lex
>
>>
>> On Tuesday, September 9, 2014 1:26:27 AM UTC+2, Lex Trotman wrote:
>>>
>>> On 9 September 2014 08:57, Ondra Žižka <[email protected]> wrote:
>>> > Hi,
>>> >
>>> > is there any way to prevent asciidoc put <p> to each <li>? Makes the
>>> > list
>>> > tall and breaks the whole page layout.
>>> >
>>> > * foo
>>> > * bar
>>> >
>>> > turns into
>>> >
>>> > <li><p>foo</p></li>
>>> > <li><p>bar</p></li>
>>> >
>>> > Note that I can't touch CSS.
>>>
>>> CSS is the right way to do it, styling should not be manipulated by
>>> the HTML content.  Asciidoc CSS currently removes the top-margin for
>>> paras inside lists, you can also remove the bottom-margin.
>>>
>>> You can always have custom CSS added to the HTML generated by Asciidoc
>>> to modify just that setting, see the stylesheet attribute in
>>> http://www.methods.co.nz/asciidoc/userguide.html#X88.
>>>
>>> Cheers
>>> Lex
>>>
>>> >
>>> > --
>>> > 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.
>>
>> --
>> 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.

-- 
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.

Reply via email to