emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* headings in odt export
@ 2015-08-24 11:44 Eric Abrahamsen
  2015-08-24 20:09 ` Rasmus
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Abrahamsen @ 2015-08-24 11:44 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 996 bytes --]

I'm seeing what seems to be a bug:

If I export a simple document to ODT with the following settings:

#+EXPORT_OPTIONS: H:3 num:t

The headings are given a proper heading style.

However if I export with:

#+EXPORT_OPTIONS: H:3 num:nil

The headings appear in "Default Style" (the body text is in "Text
Body"). In short: setting `org-export-with-section-numbers' to a non-nil
value is necessary to get the headings styled with a heading value --
otherwise they're default style.

The "contents.xml" file in the two different versions differs only like
this:

text:style-name="Heading_20_1_unnumbered"

vs

text:style-name="Heading_20_1"

That seems correct. I've attached a diff between the two different
versions of the "styles.xml" file.

I don't know much about ODT format, and don't know what's going on. I
traced `org-odt-headline', and it appeared to be behaving normally.

I'm using git Org, and the current Libreoffice version (on Arch linux)
is 4.4.5-2.

Any hints appreciated!

Eric



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: style.diff --]
[-- Type: text/x-diff, Size: 1889 bytes --]

35c35
<    <text:outline-level-style text:level="1" style:num-suffix=". " style:num-format="1">
---
>    <text:outline-level-style text:level="1" style:num-format="">
40c40
<    <text:outline-level-style text:level="2" style:num-suffix=". " style:num-format="1" text:display-levels="2">
---
>    <text:outline-level-style text:level="2" style:num-format="">
45c45
<    <text:outline-level-style text:level="3" style:num-suffix=". " style:num-format="1" text:display-levels="3">
---
>    <text:outline-level-style text:level="3" style:num-format="">
50c50
<    <text:outline-level-style text:level="4" style:num-suffix=". " style:num-format="1" text:display-levels="4">
---
>    <text:outline-level-style text:level="4" style:num-format="">
55c55
<    <text:outline-level-style text:level="5" style:num-suffix=". " style:num-format="1" text:display-levels="5">
---
>    <text:outline-level-style text:level="5" style:num-format="">
60c60
<    <text:outline-level-style text:level="6" style:num-suffix=". " style:num-format="1" text:display-levels="6">
---
>    <text:outline-level-style text:level="6" style:num-format="">
65c65
<    <text:outline-level-style text:level="7" style:num-suffix=". " style:num-format="1" text:display-levels="7">
---
>    <text:outline-level-style text:level="7" style:num-format="">
70c70
<    <text:outline-level-style text:level="8" style:num-suffix=". " style:num-format="1" text:display-levels="8">
---
>    <text:outline-level-style text:level="8" style:num-format="">
75c75
<    <text:outline-level-style text:level="9" style:num-suffix=". " style:num-format="1" text:display-levels="9">
---
>    <text:outline-level-style text:level="9" style:num-format="">
80c80
<    <text:outline-level-style text:level="10" style:num-suffix=". " style:num-format="1" text:display-levels="10">
---
>    <text:outline-level-style text:level="10" style:num-format="">

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: headings in odt export
  2015-08-24 11:44 headings in odt export Eric Abrahamsen
@ 2015-08-24 20:09 ` Rasmus
  2015-08-25  0:46   ` Eric Abrahamsen
  0 siblings, 1 reply; 6+ messages in thread
From: Rasmus @ 2015-08-24 20:09 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Any hints appreciated!

My guess is that you are using the wrong style files.  I.e. before they
were updated to included the unnumbered headings.  Try to set the relevant
variables explicitly:

(with-eval-after-load 'ox-odt  
  (let ((schema-dir "/usr/share/emacs/etc/org/schema/")
        (style-dir "/usr/share/emacs/etc/org/styles"))
    (when (file-exists-p schema-dir)
      (setq org-odt-schema-dir-list (list schema-dir)))
    (when (file-exists-p style-dir)
      (setq org-odt-styles-dir style-dir))))

makepkg/the AUR package does not handle this fact very well.

Rasmus

-- 
And when I’m finished thinking, I have to die a lot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: headings in odt export
  2015-08-24 20:09 ` Rasmus
@ 2015-08-25  0:46   ` Eric Abrahamsen
  2015-08-25 22:50     ` Rasmus
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Abrahamsen @ 2015-08-25  0:46 UTC (permalink / raw)
  To: emacs-orgmode

Rasmus <rasmus@gmx.us> writes:

> Hi,
>
> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Any hints appreciated!
>
> My guess is that you are using the wrong style files.  I.e. before they
> were updated to included the unnumbered headings.  Try to set the relevant
> variables explicitly:

That was it! Thanks a lot. Those vars did point at existing directories
on my system (that appear to contain the right files), but I tried
switching them to point at the /etc directory inside my git checkout of
Org, and now everything works again.

I don't know what happened to mess this behavior up, but Libreoffice has
started acting very strange in general on Arch...

Thanks again,
Eric

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: headings in odt export
  2015-08-25  0:46   ` Eric Abrahamsen
@ 2015-08-25 22:50     ` Rasmus
  2015-08-27  3:38       ` Eric Abrahamsen
  0 siblings, 1 reply; 6+ messages in thread
From: Rasmus @ 2015-08-25 22:50 UTC (permalink / raw)
  To: emacs-orgmode

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> I don't know what happened to mess this behavior up, but Libreoffice has
> started acting very strange in general on Arch...

I envy how everything Just Works on Fedora.  While I quite enjoy pacman
and makepkg, the level of polish of Fedora is hard to match on Arch.

I have not had problems with LO5 ("libreoffice-fresh"), but I'm a very
occasional user.  The problem you mention is purely an installation
problem.  Check org-loaddefs.el.  It will probably contains references to
/tmp cause that's where makepkg builts it.

Rasmus

-- 
When the facts change, I change my mind. What do you do, sir?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: headings in odt export
  2015-08-25 22:50     ` Rasmus
@ 2015-08-27  3:38       ` Eric Abrahamsen
  2015-08-27  8:00         ` Rasmus
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Abrahamsen @ 2015-08-27  3:38 UTC (permalink / raw)
  To: emacs-orgmode

Rasmus <rasmus@gmx.us> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> I don't know what happened to mess this behavior up, but Libreoffice has
>> started acting very strange in general on Arch...
>
> I envy how everything Just Works on Fedora.  While I quite enjoy pacman
> and makepkg, the level of polish of Fedora is hard to match on Arch.
>
> I have not had problems with LO5 ("libreoffice-fresh"), but I'm a very
> occasional user.  The problem you mention is purely an installation
> problem.  Check org-loaddefs.el.  It will probably contains references to
> /tmp cause that's where makepkg builts it.

Libreoffice has started behaving horribly on both my Arch machines
(quits when I scroll, display can't keep up with modest typing speeds)
but I wonder if it's because I'm not using a desktop environment, and LO
is getting confused. That's a total guess, but

I use git, not makepkg, for both Emacs and Org (Emacs with "make
install", Org in-place), and there's no reference to tmp in
org-loaddefs, so I don't know if that's related. As far as I know,
nothing at all changed on my system apart from these general updates.
I'm still inclined to blame LO!

Eric

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: headings in odt export
  2015-08-27  3:38       ` Eric Abrahamsen
@ 2015-08-27  8:00         ` Rasmus
  0 siblings, 0 replies; 6+ messages in thread
From: Rasmus @ 2015-08-27  8:00 UTC (permalink / raw)
  To: emacs-orgmode

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Libreoffice has started behaving horribly on both my Arch machines
> (quits when I scroll, display can't keep up with modest typing speeds)
> but I wonder if it's because I'm not using a desktop environment, and LO
> is getting confused. That's a total guess, but

I don't see how that could be related.

> I use git, not makepkg, for both Emacs and Org (Emacs with "make
> install", Org in-place), and there's no reference to tmp in
> org-loaddefs, so I don't know if that's related.

OK.  makepkg screws up org-loaddef because it built in tmp.  And ox-odt is
bad at finding the "right" stylefiles.

> As far as I know, nothing at all changed on my system apart from these
> general updates.

You can check the variables I mentioned earlier in the thread.

> I'm still inclined to blame LO!

This is in vain.  Org included the wrong style files.  This problem pops
up frequently.

Rasmus

-- 
El Rey ha muerto. ¡Larga vida al Rey!

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-08-27  8:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-24 11:44 headings in odt export Eric Abrahamsen
2015-08-24 20:09 ` Rasmus
2015-08-25  0:46   ` Eric Abrahamsen
2015-08-25 22:50     ` Rasmus
2015-08-27  3:38       ` Eric Abrahamsen
2015-08-27  8:00         ` Rasmus

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).