Re: [O] Need extra text in ODT export of headers

2014-02-08 Thread Jambunathan K

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.



test-styled.odt
Description: application/vnd.oasis.opendocument.text
#+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: kjambunat...@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


test.ott
Description: application/vnd.oasis.opendocument.text-template


test.odt
Description: application/vnd.oasis.opendocument.text
#+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: kjambunat...@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



Christian Moe m...@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 kc5...@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.



Re: [O] Need extra text in ODT export of headers

2014-02-04 Thread Christian Moe

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 kc5...@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.




[O] Need extra text in ODT export of headers

2014-02-03 Thread Dan Griswold
Hi all,

I have to do something particular in org-mode, and I'm stumped.

The manuscript I will need to submit to my publisher is to be very sparse
on formatting in MS-Word. So for headings I need to mark them A for first
level headings, B for second level, C for third level.

So, with an org file that looks somewhat like this:

* Here's a top Heading

** Here's a subheading

* Here's another top Heading

I would get in an ODT export:

A Here's a top Heading

B Here's a subheading

A Here's another top Heading



Do any of you have suggestions for how I could accomplish this, short of
manually supplying that text for every single heading (67) in the several
org files that comprise the manuscript?

Perhaps there's a way to do this using LO styles. But I can't figure that
out, either.

Thanks,

Dan Griswold
Rochester, NY


Re: [O] Need extra text in ODT export of headers

2014-02-03 Thread Dan Griswold
That might do the trick. The added text appears as expected in a file saved
as text only. 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.

I hope that I can soon ask an editor with the publishing company whether
this is acceptable. But for now, it seems to work. So thank you!

Dan



On Mon, Feb 3, 2014 at 11:04 AM, Christian Moe m...@christianmoe.comwrote:


 Hi,

 Here's one way to do it in LibreOffice:

 Go to Tools  Outline Numbering

 For each heading level,

 under Separator  After,

 add the markup they want (A for first level, etc.).

 This should work for your printed manuscript. However, you'd need to
 test if it's still there when you've converted to MS Word (don't have it
 at hand).

 Yours,
 Christian

 Dan Griswold writes:

  Hi all,
 
  I have to do something particular in org-mode, and I'm stumped.
 
  The manuscript I will need to submit to my publisher is to be very sparse
  on formatting in MS-Word. So for headings I need to mark them A for
 first
  level headings, B for second level, C for third level.
 
  So, with an org file that looks somewhat like this:
 
  * Here's a top Heading
 
  ** Here's a subheading
 
  * Here's another top Heading
 
  I would get in an ODT export:
 
  A Here's a top Heading
 
  B Here's a subheading
 
  A Here's another top Heading
 
 
 
  Do any of you have suggestions for how I could accomplish this, short of
  manually supplying that text for every single heading (67) in the several
  org files that comprise the manuscript?
 
  Perhaps there's a way to do this using LO styles. But I can't figure that
  out, either.
 
  Thanks,
 
  Dan Griswold
  Rochester, NY




Re: [O] Need extra text in ODT export of headers

2014-02-03 Thread Jambunathan K
Dan Griswold kc5...@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.