emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jambunathan K <kjambunathan@gmail.com>
Cc: Dan Griswold <kc5gmr@gmail.com>, Emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Need extra text in ODT export of headers
Date: Sun, 09 Feb 2014 10:01:14 +0530	[thread overview]
Message-ID: <87sirsc3fx.fsf@gmail.com> (raw)
In-Reply-To: m2a9e7kzwi.fsf@uio.no

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


This is what I tried and I have LibreOffice 4.1.3.2 on Debian.  See
attachments for what I mean down below.

1. Export test.org to test.odt
2. Open test.odt, fix outline numbering and save as test.ott
3. Copy test.org to test-styled.org and apply test.ott as ODT_STYLES_FILE.
4. Export test-styled.org to test-styled.odt
5. I see that test-styled.odt has the required outline numbering.

   Don't be fooled by the numbering in TOC.  The TOC is not in sync with
   what the style says.  Just update the TOC (i.e., Update All) and
   everything will be just fine.

I am assuming that what I show here - with some variations thereof - is
what the OP wants to achieve.


[-- Attachment #2: test-styled.odt --]
[-- Type: application/vnd.oasis.opendocument.text, Size: 10428 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: test-styled.org --]
[-- Type: text/x-org, Size: 576 bytes --]

#+OPTIONS: ':nil *:t -:nil ::t <:t H:3 \n:nil ^:t arch:headline
#+OPTIONS: author:t c:nil creator:comment d:(not "LOGBOOK") date:t
#+OPTIONS: e:t email:nil f:t inline:t num:t p:nil pri:nil prop:nil
#+OPTIONS: stat:t tags:t tasks:t tex:t timestamp:t toc:t todo:t |:t
#+TITLE: test
#+DATE: <2014-02-09 Sun>
#+AUTHOR: Jambunathan K
#+EMAIL: kjambunathan@gmail.com
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE: en
#+SELECT_TAGS: export
#+EXCLUDE_TAGS: noexport
#+CREATOR: Emacs 24.3.50.20 (Org mode 8.2.5h)

#+OPTIONS: tex:dvipng
#+ODT_STYLES_FILE: "test.ott"


* one

** two

*** three

[-- Attachment #4: test.ott --]
[-- Type: application/vnd.oasis.opendocument.text-template, Size: 15505 bytes --]

[-- Attachment #5: test.odt --]
[-- Type: application/vnd.oasis.opendocument.text, Size: 10694 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #6: test.org --]
[-- Type: text/x-org, Size: 522 bytes --]

#+OPTIONS: ':nil *:t -:nil ::t <:t H:3 \n:nil ^:t arch:headline
#+OPTIONS: author:t c:nil creator:comment d:(not "LOGBOOK") date:t
#+OPTIONS: e:t email:nil f:t inline:t num:t p:nil pri:nil prop:nil
#+OPTIONS: stat:t tags:t tasks:t tex:t timestamp:t toc:t todo:t |:t
#+TITLE: test
#+DATE: <2014-02-09 Sun>
#+AUTHOR: Jambunathan K
#+EMAIL: kjambunathan@gmail.com
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE: en
#+SELECT_TAGS: export
#+EXCLUDE_TAGS: noexport
#+CREATOR: Emacs 24.3.50.20 (Org mode 8.2.5h)

* one

** two

*** three

[-- Attachment #7: Type: text/plain, Size: 1611 bytes --]




Christian Moe <mail@christianmoe.com> writes:

> Hi, Jambunathan,
>
> I was going to tell Dan the same thing, but for some reason, the below
> doesn't work for me with outline numbering. Can you confirm that it
> works for you?
>
> When I try, the paragraph styles from the template *do* get applied
> (tested by coloring some headings), but the custom outline numbering
> does not.
>
> To see if it ought to, I also tried to "load styles" from the OTT
> into an ODT document, but again, custom outline numbering did not follow
> along, so I'm not sure if it should be expected to work with Org ODT
> export either.
>
> Yours,
> Christian
>
> Jambunathan K writes:
>
>> The following message is a courtesy copy of an article
>> that has been posted to gmane.emacs.orgmode as well.
>>
>> Dan Griswold <kc5gmr@gmail.com> writes:
>>
>>> The only downside right now seems to be that I have to do the outline
>>> numbering for each file in the manuscript. But there are only 9 of
>>> them.
>>
>> You just need to create a opendocument template file and have all the
>> org file use it.
>>
>> See
>>
>>    (info "(org) Applying custom styles")
>>
>> 1. Export ONE document.
>> 2. Fix outline numbering
>> 3. Save the file as say custom-style.ott (Note: It is OTT and not ODT)
>> 4. Add a directive to ALL THE OTHER org file as below.
>>
>>        M-x org-export-insert-default-template odt
>>
>>    and modify the ODT_STYLES_FILE directive as below.
>>
>>       #+ODT_STYLES_FILE: "~/a/b/custom-style.ott"
>>
>> 5. Now if I export the org files with (4), you will get the outline
>>    numbering that you desire.


      reply	other threads:[~2014-02-09  4:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-03 15:43 Need extra text in ODT export of headers Dan Griswold
     [not found] ` <m2bnyokwrr.fsf@uio.no>
2014-02-03 16:12   ` Dan Griswold
2014-02-04  2:52     ` Jambunathan K
2014-02-04  9:09       ` Christian Moe
2014-02-09  4:31         ` Jambunathan K [this message]

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=87sirsc3fx.fsf@gmail.com \
    --to=kjambunathan@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=kc5gmr@gmail.com \
    /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 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).