Perry Smith <[email protected]> writes:

> I believe the paragraph is because the description list is not one
> list in test 2 but three lists and this probably triggers something in
> the output of a list to put things into paragraphs. Thus, I believe
> the real issue / question is that Test 2 puts into three separate
> lists.
>
> I’m not horribly shocked by this and I can understand if the reply is
> that this is working as designed but I thought I would mention it.

Yes, I think it is working as it should. For these purposes, the
drawback of a drawer rather than an include statement is that the drawer
is an element in its own right (in Org syntax: a "greater element", one
that can contain others). A drawer with the same indent as the list
items is a new element, signaling the end of the list.

I'm not sure why this leads to wrapping the initial text of the parent
<li> in a <p> element.

Results differ across exporters. In text export and ODT export, the
outputs of your Test 1 and Test 2 look identical (the ODT exporter wraps
the initial text in <text:p> in both cases). In LaTeX/PDF, there is no
visual difference before the list, but the list in the drawer gets added
space before and after.

One suggestion for a workaround: Typographically, the Test 2 behavior
(where the description list is set off by initial vertical space) looks
better. This is what I think you'd want, unless you're working to a
style guide that says otherwise.

It might actually be desirable for the Org html exporter to wrap text in
a list item in <p> before an included description list in any case, not
just where the list is split, but I haven't thought that through
carefully.

But as long as it doesn't, you could make the Test 1 cases look the same
with (the ugly and irksomely manual, but structurally identical)

  Test 1 blah blah blah
  * @@html:<p>@@with no drawer a description list that includes a 
list@@html:</p>@@
    * heading 1 before the drawer ::
      description 1

or with CSS like (the more elegant and labor-saving, structurally
different but visually equivalent)

  #+HTML_HEAD_EXTRA: <style>li dl {margin-top: 1em;}</style>

Regards,
Christian
  

Reply via email to