Re: [O] Flattening references in ODT export
On Sun, 10 Sep 2017 04:18:08 -0400 Nicolas Goaziou wrote > > On Sat, 09 Sep 2017 05:06:24 -0400 James Harkins > > wrote > >> I guess next I'm going to try to hack ox-odt.el... > > > > Hm, that's going to be too complicated. > > I can help you doing so. Thanks. At this point, I've decided to abandon org export so that I can have more direct control over the captions and indexes. A bit painful decision, because I really like the way org handles in-line formatting, but the final document needs to "just work." But... it might be an enhancement to put on the wish list. As far as I can see, org assumes that figure categories should always be kept separate and indexed separately, and the assumption seems to be embedded pretty deeply. It would be worth having a switch in the export options to turn that off. hjh
Re: [O] Flattening references in ODT export
Hello, James Harkins writes: > On Sat, 09 Sep 2017 05:06:24 -0400 James Harkins > wrote >> I guess next I'm going to try to hack ox-odt.el... > > Hm, that's going to be too complicated. I can help you doing so. > So I suppose my only other option is to make an SVG for every code example, > and include only images. Or hack the xml by hand in the final editing stage. > > But it's strange... it seems like it should be simple enough to have > one counter for both figures and listings. AFAIK, other export back-ends distinguish them, too. At least "ox.el" contains both `org-export-collect-figures' and `org-export-collect-listings'. Regards, -- Nicolas Goaziou
Re: [O] Flattening references in ODT export
On Sat, 09 Sep 2017 05:06:24 -0400 James Harkins wrote > I guess next I'm going to try to hack ox-odt.el... Hm, that's going to be too complicated. So I suppose my only other option is to make an SVG for every code example, and include only images. Or hack the xml by hand in the final editing stage. But it's strange... it seems like it should be simple enough to have one counter for both figures and listings. I'm surprised that org seems to be really quite adamant that nobody would ever, ever want this. hjh
Re: [O] Flattening references in ODT export
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
[O] Flattening references in ODT export
Hi, 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. Hm. I am pretty sure this will not satisfy the journal's style requirements. It seems there is some customizability here[1], but which predicate should I use in place of org-odt--enumerable-image-p for listings? I'm willing to avoid SRC blocks if that will help. Also, it may not help to wrap all of these entities in FIGURE blocks, because I found (the hard way) ODT export fails if an image is inside a figure block. Thanks, hjh [1] http://orgmode.org/manual/Labels-and-captions-in-ODT-export.html#Labels-and-captions-in-ODT-export