From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: org-odt (Applying custom templates) Date: Thu, 24 Mar 2011 00:43:11 +0530 Message-ID: <81k4fpejlk.fsf@gmail.com> References: <81pqqxyrq5.fsf@gmail.com> <81ei7cjpuy.fsf@gmail.com> <81fwqevzgz.fsf_-_@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=58067 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q2TUm-0003RV-Ub for emacs-orgmode@gnu.org; Wed, 23 Mar 2011 15:13:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q2TUl-0007xL-JM for emacs-orgmode@gnu.org; Wed, 23 Mar 2011 15:13:28 -0400 Received: from mail-yi0-f41.google.com ([209.85.218.41]:50685) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q2TUl-0007wr-6g for emacs-orgmode@gnu.org; Wed, 23 Mar 2011 15:13:27 -0400 Received: by yib2 with SMTP id 2so4521174yib.0 for ; Wed, 23 Mar 2011 12:13:26 -0700 (PDT) In-Reply-To: <81fwqevzgz.fsf_-_@gmail.com> (Jambunathan K.'s message of "Wed, 23 Mar 2011 17:08:20 +0530") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Vinh Nguyen Cc: emacs-orgmode@gnu.org Vinh >> In addition, is there a way to set up a header, or some text, before >> the title, similar to the attached file (including the image)? I >> don't mind if the solution is pasting some raw xml code in the >> org-mode file, as this part will remain constant. > > What is required is that you extract styles.xml and any images files > that it referenced from your odt/ott file and instruct org-odt.el to > package these files in the resulting directory. You can do these > manually. > > I also have a prototype code (that is not committed yet) that achieves > the above functionality. I pushed a fix to my staging branch. If you set the variable as below (setq org-export-odt-styles-file '("~/tmp-orgmode/Thu Thong Bao - Trai Ve Nguon XV (2011).odt" ("styles.xml" "Pictures/10000000000002740000034B83A526F3.png"))) the styles.xml and header images would get copied on to the generated odt file. If the desired styles.xml makes no references to other files (as in the example above) then the above variable could be set to (setq org-export-odt-styles-file "~/tmp-orgmode/Thu Thong Bao - Trai Ve Nguon XV (2011).odt") or (setq org-export-odt-styles-file "~/elisp/styles.xml") In both the case org-odt's native styles file will be replaced by the one that is specified (implicity or explicitly) > > See the attached output file and you could see that the headers are > getting repeated on all pages. > > On customization side of things, I am little bit uncertain what would be > the best way to apply custom styles while also having the user feel > happy about the document that comes out as a result. (When I apply your > styles.xml to override my Org's very own styles file, the resulting > output file is not pleasing to the eye (for example, Headings are > unstylized) This is because your styles.xml doesn't specify styles for > 'Heading 2' while for some strange reason - partly because of it's > ancestry org-odt.el - is emitting Headings from level 2 onwards) > > I am open to hearing what orgers think on this front. I would go very > slow on the customization side of things unless some consensus or clariy > emerges. Jambunathan K.