all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: James Harkins <jamshark70@zoho.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Flattening references in ODT export
Date: Sat, 09 Sep 2017 05:06:24 -0400	[thread overview]
Message-ID: <15e65e3d798.ef60fefd7401.2799660576381211092@zoho.com> (raw)
In-Reply-To: <15e64c481f0.d05cb2d55607.5349430882435325093@zoho.com>

---- On Fri, 08 Sep 2017 23:52:33 -0400 James Harkins <jamshark70@zoho.com> 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:

<text:sequence-decls>
<text:sequence-decl text:display-outline-level="2" text:name="Table"/>
<text:sequence-decl text:display-outline-level="2" text:name="Illustration"/>
<text:sequence-decl text:display-outline-level="2" text:name="Text"/>
<text:sequence-decl text:display-outline-level="2" text:name="Equation"/>
<text:sequence-decl text:display-outline-level="2" text:name="Illustration"/>
</text:sequence-decls>

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

  reply	other threads:[~2017-09-09  9:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-09  3:52 Flattening references in ODT export James Harkins
2017-09-09  9:06 ` James Harkins [this message]
2017-09-09  9:16   ` James Harkins
2017-09-10  8:18     ` Nicolas Goaziou
2017-09-10  8:31       ` 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

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

  git send-email \
    --in-reply-to=15e65e3d798.ef60fefd7401.2799660576381211092@zoho.com \
    --to=jamshark70@zoho.com \
    --cc=emacs-orgmode@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.