From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Harkins Subject: Re: Flattening references in ODT export Date: Sat, 09 Sep 2017 05:06:24 -0400 Message-ID: <15e65e3d798.ef60fefd7401.2799660576381211092@zoho.com> References: <15e64c481f0.d05cb2d55607.5349430882435325093@zoho.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53263) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dqbii-0005qL-So for emacs-orgmode@gnu.org; Sat, 09 Sep 2017 05:06:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dqbie-0001NA-Ua for emacs-orgmode@gnu.org; Sat, 09 Sep 2017 05:06:32 -0400 Received: from sender-pp-091.zoho.com ([135.84.80.236]:25057) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dqbie-0001Lz-M7 for emacs-orgmode@gnu.org; Sat, 09 Sep 2017 05:06:28 -0400 In-Reply-To: <15e64c481f0.d05cb2d55607.5349430882435325093@zoho.com> 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: emacs-orgmode ---- On Fri, 08 Sep 2017 23:52:33 -0400 James Harkins wrote ---- > Is there a way to have "figure" references in ODT exports be simply a flat list? > > Meaning -- I would like "Example 1," "Example 2," etc. (or "Figure," doesn't really matter). > > With "num:nil," "Listing 1," "Listing 2," "Listing 3," but there is also a figure, which becomes "Figure 1." So there's a listing and a figure with the same index number. So I found variable-help for org-odt-category-map-alist. BTW the variable's help conflicts with the org manual. The manual says, to change the displayed label, you should change the second string for the category, but the help in Emacs indicates it's actually the fourth string. Manual says: (setq org-odt-category-map-alist '(("__Figure__" "Illustration" "value" "Figure" org-odt--enumerable-image-p))) Should be: (setq org-odt-category-map-alist '(("__Figure__" "Figure" "value" "Illustration" org-odt--enumerable-image-p))) But it's still not working. Maybe I'm misunderstanding the fields. I thought keying __Figure__ and __Listing__ both to the OD-VARIABLE "Illustration" would make both of them share one numeric sequence: (setq org-odt-category-map-alist '(("__Table__" "Table" "value" "Table" org-odt--enumerable-p) ("__Figure__" "Illustration" "value" "Figure" org-odt--enumerable-image-p) ("__MathFormula__" "Text" "math-formula" "Equation" org-odt--enumerable-formula-p) ("__DvipngImage__" "Equation" "value" "Equation" org-odt--enumerable-latex-image-p) ("__Listing__" "Illustration" "value" "Figure" org-odt--enumerable-p))) ... but they still get separate counters. One suspicious thing in content.xml: Org generates two Illustration counters...? OK, so org has an inherent limitation that every distinct type of labeled entity must have a separate counter. Well, bother. I guess next I'm going to try to hack ox-odt.el... (and, mental note, don't write for a journal ever again that won't accept PDF, 'cause the ODT exporter is really not mature by comparison. And don't tell me to write directly in LibreOffice, I have reasons why that is a terrible idea for me. I'll explain them another time if you like.) hjh