emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: James Harkins <jamshark70@zoho.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: ox-odt: List items contain body paragraphs, confusing styles
Date: Thu, 17 Aug 2017 16:33:29 +0200	[thread overview]
Message-ID: <877ey2p8li.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <15dee1721ff.1065cbcc844521.4283798913058133@zoho.com> (James Harkins's message of "Wed, 16 Aug 2017 22:47:59 -0400")

Hello,

James Harkins <jamshark70@zoho.com> writes:

> Hi, haven't been active here for a while (which is a good thing -- it means I haven't had any problems worth mentioning!).
>
> Now I have one -- ODT export encodes list items as a list-item containing a "text:p":
>
> <text:list text:style-name="OrgBulletedList" text:continue-numbering="false">
> <text:list-item>
>
> <text:p text:style-name="Text_20_body">blah blah</text:p>
>
> </text:list-item>
> </text:list>
>
> When LibreOffice reads this, it applies indentation settings from the
> Text_20_body paragraph style to the list item. So, for instance, if
> you're writing for a journal that requires a .doc and it also requires
> paragraphs to be first-line indented, it becomes impossible to have
> hanging bullets in bullet lists -- the list outdents the bullet by
> 0.25" but the paragraph style then indents this by 0.5" for a net
> indent of 0.25".
>
> ask.libreoffice.org says "It is usually preferable to make paragraph
> styles formatting lists independent from bulk text styles"[1] -- i.e.,
> applying the same style to a list-item paragraph as to a free-standing
> paragraph is not recommended.
>
> I can guess structurally why this occurs -- I suppose org parses it as
> a list-item node containing a paragraph node, and the paragraph node
> is encoded first, without any knowledge of its context.

So, what style-name should have the inner paragraph? If it is a new
style, what would be its definition?

It's not difficult to check, upon exporting a paragraph, if it belongs
to a list item or not: (org-element-lineage paragraph '(item))

BTW, is it different for nested paragraphs, e.g., what should be the
style for the following 3 paragraphs:

  - para 1

    para 2

    - para 3

Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2017-08-17 14:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-17  2:47 ox-odt: List items contain body paragraphs, confusing styles James Harkins
2017-08-17 14:33 ` Nicolas Goaziou [this message]
2017-08-18  3:27   ` James Harkins
2017-08-19  8:36     ` Nicolas Goaziou
2017-08-19 10:40       ` James Harkins
2017-08-19 11:55         ` Nicolas Goaziou
2017-08-20  6:10           ` James Harkins
2017-08-20 10:13             ` Nicolas Goaziou
2017-08-20 12:46               ` James Harkins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877ey2p8li.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=jamshark70@zoho.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).