From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: Re: odt export with 'header' Date: Wed, 23 Oct 2013 14:08:06 +0200 Message-ID: <87bo2gdwbd.fsf@med.uni-goettingen.de> References: <8738o1cb6h.fsf@med.uni-goettingen.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYxEl-0000aS-D2 for emacs-orgmode@gnu.org; Wed, 23 Oct 2013 08:08:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VYxEf-0004pd-6N for emacs-orgmode@gnu.org; Wed, 23 Oct 2013 08:08:31 -0400 Received: from plane.gmane.org ([80.91.229.3]:56989) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYxEe-0004pW-Rx for emacs-orgmode@gnu.org; Wed, 23 Oct 2013 08:08:25 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VYxEc-0005TF-BO for emacs-orgmode@gnu.org; Wed, 23 Oct 2013 14:08:22 +0200 Received: from genepi110.genepi.med.uni-goettingen.de ([134.76.140.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 23 Oct 2013 14:08:22 +0200 Received: from andreas.leha by genepi110.genepi.med.uni-goettingen.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 23 Oct 2013 14:08:22 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi Christian, thanks a lot for this. It was definitely helpful. Sorry, I did not get back to this earlier. I do have some issues with this, still -- see my inline comments below. Christian Moe writes: > Hi, > > Andreas Leha writes: > >> I'd like to have a 'header' on the first page of a odt exported document > > Here is a fiddly way to do it. There may be easier and/or more correct > ways. And perhaps the ODT exporter could use a preamble option like > the HTML exporter has. But this should work, more or less. I do not find this fiddly. This really works as I would expect. At least, if I get past the issues below. > > The trick is to put your header in an actual header in the style > template, a page header that will only be shown on the first page. This > works because header contents are included with the page style. So try > making a style template again: > > 1. Export your document and open in Open-/LibreOffice. > > 2. Modify the styles to your heart's content. Hint: You may want to > make the Title and Subtitle styles hidden (Modify Paragraph Style > > Font Effects tab > check Hidden). Or you may skip this step for now > and come back later. I'll come back later .... > > 3. Give the first page the page style OrgFirstPage. Which I had to create new. Is that intended? > > 4. Do Insert > Header > OrgFirstPage. > > 5. Put the content you want in the header, > inserting the appropriate fields: > > #+begin_example >> ,---- >> | Some fixed text here +------------------+ >> | | [Insert>Picture] | >> | +------------------+ >> | >> | Some fixed text >> | [Insert>Field>Author] >> | Some more fixed text >> | >> | [Insert>Field>Date] >> | >> | [Insert>Field>Title] >> | Some Subtitle >> | >> `---- > #+end_example > 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) 2. (The same happens for email) 3. The date always shows the current date, but I'd like to see the #+DATE: value. > 6. Save the template. > > 7. Try exporting with the path to the template in ODT_STYLES_FILE. > (Actually, if you're going to include a logo or other picture, it > gets a little more involved. You will need to include both the path > to the template and the relative paths to "styles.xml" and the image > file inside it, as described in the manual.) I haven't tried that yet. But I will. > > 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. > > 9. Following the header, you will still have the usual preamble with > title, date, and if you haven't turned it off, the authorname. If you > have made the Title and Subtitle styles hidden (step 2 above), they > will be invisible in print. If not, you will need to delete them > manually. > > Hope this helps? It helps a lot already thanks so much! If there is a possibility to get the fields automatically filled with the orgmode values, then the only manual intervention (in therory) should be to switch the first page into OrgFirstPage style. Regards, Andreas