From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: ox-odt: List items contain body paragraphs, confusing styles Date: Thu, 17 Aug 2017 16:33:29 +0200 Message-ID: <877ey2p8li.fsf@nicolasgoaziou.fr> References: <15dee1721ff.1065cbcc844521.4283798913058133@zoho.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1diLrZ-0000rw-N3 for emacs-orgmode@gnu.org; Thu, 17 Aug 2017 10:33:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1diLrY-0001P2-Kg for emacs-orgmode@gnu.org; Thu, 17 Aug 2017 10:33:33 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:33148) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1diLrY-0001OW-Eh for emacs-orgmode@gnu.org; Thu, 17 Aug 2017 10:33:32 -0400 In-Reply-To: <15dee1721ff.1065cbcc844521.4283798913058133@zoho.com> (James Harkins's message of "Wed, 16 Aug 2017 22:47:59 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: James Harkins Cc: emacs-orgmode Hello, James Harkins 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": > > > > > blah blah > > > > > 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