emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Andreas Leha <andreas.leha@med.uni-goettingen.de>
To: emacs-orgmode@gnu.org
Subject: Re: odt export with 'header'
Date: Thu, 24 Oct 2013 00:00:40 +0200	[thread overview]
Message-ID: <87iownd4vr.fsf@med.uni-goettingen.de> (raw)
In-Reply-To: 87vc0occjw.fsf@med.uni-goettingen.de

Hi Christian,

[bringing this back on the list]


>Andreas Leha <andreas.leha@med.uni-goettingen.de> writes:
>
>> Christian Moe <mail@christianmoe.com> writes:
>>
>>> Andreas Leha writes:
>>>
>>>>> 3. Give the first page the page style OrgFirstPage. 
>>>>
>>>> Which I had to create new.  Is that intended?
>>>
>>> No, I get that out of the box on a clean system, so I think you should
>>> see it too. (Along with OrgTitlePage, which is the style I actually used
>>> for testing, and OrgFrontMatter.)
>>>
>>> When modifying a style template for ODT export, the manual strongly
>>> recommends starting from an ODT document that you have already exported
>>> from Org, so it includes the styles provided by the exporter. Are you
>>> sure that's what you did?
>>>
>>
>> Yes.  I just tried with emacs -Q and loading only orgmode (8.2.1
>> (release_8.2.1-120-g5975d7).  Basically, I only required ox-otd prior to
>> exporting my test document.
>>
>> I do get many Orgxxx templates for lists, paragraphs, ... but none for
>> pages.
>>
> It doesn't strictly have to be that style, or an Org-prefixed style at
> all, but it's strange that you don't have them.
> 

Yes, which style is used seems not essential (as it works with my
self-created OrgFirstPage style).  But I guess, that getting (at
one point) orgmode to automatically assign the desired style to
the first page will be only possible, if the intended style is
used.


> Let's see. The Styles-and-formatting window has five tabs, for
> Paragraph, Character, Frame, Page and List Styles. But you have clicked
> the Page Styles icon, then, and not found any Org-prefixed styles there?
> 

Correct, but see below.


> What is the value of the variable `org-odt-styles-file'? If nil, what is
> your `org-odt-styles-dir'? You should find an `OrgOdtStyles.xml' in one
> of those.


That was the correct pointer.  org-odt-styles-file is indeed nil,
and org-odt-styles-dir is pointing to the wrong directory!  I
gather that it is derived from org-odt-styles-dir-list.  That
list contains the correct directory, but only at the third
position.

<------- short excurs on org odt styles ------------

I install orgmode from git using
$ make up1; make install.

I have in my local.mk
,----
| # Where local software is found
| prefix	= /home/andreas/local/emacs/org-mode-install
| 
| # Where local lisp files go.
| lispdir= $(prefix)/lisp
| 
| # Where local data files go.
| datadir = $(prefix)/etc/
`----

But still the correct folder
/home/andreas/local/emacs/org-mode-install/etc/styles/ is only at
the fourth position in org-odt-styles-dir-list:

,----
| org-odt-styles-dir-list is a variable defined in `ox-odt.el'.
| Its value is
| ("/usr/share/emacs/etc/org/styles/" "/usr/share/emacs/etc/org/styles/" "/home/andreas/local/emacs/etc/styles/" "/home/andreas/local/emacs/org-mode-install/lisp/etc/styles/" "/usr/share/emacs/24.3/etc/org/")
`----

(The third entry is even a non-existent directory.)

Isn't that supposed to be set automagically during the install process?

I have now a
(setq org-odt-styles-dir "/home/andreas/local/emacs/org-mode-install/etc/styles")
in my .emacs
Is that the correct fix here?

-------- short excurs on org odt styles ------------->


> If you open it and search for `OrgFirstPage' or
> `OrgTitlePage', what do you find?
> 

In the correct style file I see OrgFirstPage now.  Everything fine.

>> Any idea, what could be wrong here?
>>
>>>> Field values do not behave, as I would like:
>>>> 1. I do not get anything in the author field (and would like
>>>>    the #+AUTHOR value)
>>>
>>> That's what I get, so I don't know why your case differs. I don't
>>> suppose you have turned off inclusion of author information? Please
>>> check your export options, and what you find when you look at
>>> File > Properties in LibreOffice.
>>
>> Sorry, my bad.  I had indeed disabled the author in the export
>> properties of the subtree and did not check there.
>>
> I assume this works, then.

It does, thanks.

>>>
>>>> 2. (The same happens for email)
>>>
> And if you enable #+OPTIONS: email:t ...?

Does not seem to change anything here.

>>>
>>>> 3. The date always shows the current date, but I'd like to see
>>>>    the #+DATE: value.
>>>
>>> Yes, this is a little more tricky than I thought.
>>>
>>> Try this: 
>>>
>>> Insert > Fields > Other > Tab:DocInformation > Type:Created, Select:Date
>>>
>>
>> Well, I changed the date in the org file (#+DATE: 2013-10-10) and I do not know
>> where that value would be set in the odt.  In the standard export it is
>> included as text formatted as OrgSubtitle, so I guess it is not a field
>> value, I could display someplace else?
>>
>> The field you suggest seems to give me what it says:  the creation date.
>>
> 
> Yes, try using a timestamp instead:
> 
> #+DATE: [2013-10-10]
> 

That works, thanks.  I do not always use a real date here (but sometimes
also sth like '3rd meeting of ...').  But that is not a real problem --
I can easily restrict myself to using real dates only.

>> [...]
>>
>>>>> 8. If you don't see your custom header in the exported document, you may
>>>>>    have to put the first page in OrgFirstPage style manually. (Not sure
>>>>>    how to make this happen automatically.)
>>>>
>>>> It would be nice to have this happen somehow.
>>>
>>> I'll need to get back to you on that.
>>>
>>
>> No(t too many) worries here.  I can live with that manual interaction
>> (for now). ;-)
>>
>>


Thank again for all your help and patience.

Regards,
Andreas

  reply	other threads:[~2013-10-23 22:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-16 18:39 odt export with 'header' Andreas Leha
2013-10-17 14:26 ` Christian Moe
2013-10-23  9:23   ` Christian Moe
2013-10-23 12:14     ` Andreas Leha
2013-10-23 12:08   ` Andreas Leha
2013-10-23 12:50     ` Christian Moe
2013-10-23 14:00       ` Andreas Leha
2013-10-23 22:00         ` Andreas Leha [this message]
2013-10-24  8:47           ` Christian Moe
2013-10-24  9:19             ` Christian Moe
2013-10-24 10:42               ` Andreas Leha
2013-10-24  9:19             ` Andreas Leha

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=87iownd4vr.fsf@med.uni-goettingen.de \
    --to=andreas.leha@med.uni-goettingen.de \
    --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 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).