From mboxrd@z Thu Jan 1 00:00:00 1970 From: Renzo Been Subject: Re: question about ODT export behavior Date: Fri, 15 Jul 2011 20:34:57 +0000 (UTC) Message-ID: References: <817h7mce7q.fsf@gmail.com> <81oc0yaqes.fsf@gmail.com> <4E1E91D3.70800@diplan.de> <87wrfkx3wo.fsf@gnu.org> <81oc0w9jie.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:47055) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qhp6Y-0001Uc-Mm for emacs-orgmode@gnu.org; Fri, 15 Jul 2011 16:35:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qhp6T-000486-V9 for emacs-orgmode@gnu.org; Fri, 15 Jul 2011 16:35:22 -0400 Received: from lo.gmane.org ([80.91.229.12]:40979) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qhp6T-00047z-DL for emacs-orgmode@gnu.org; Fri, 15 Jul 2011 16:35:17 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Qhp6Q-0001kn-C0 for emacs-orgmode@gnu.org; Fri, 15 Jul 2011 22:35:14 +0200 Received: from ip56507cb9.direct-adsl.nl ([86.80.124.185]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 15 Jul 2011 22:35:14 +0200 Received: from swangdoodles by ip56507cb9.direct-adsl.nl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 15 Jul 2011 22:35:14 +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 Jambunathan K gmail.com> writes: > >> Can you give me a hint where I can find some documentation about > >> changing the styles.xml? > > > > You can have a look at contrib/odt/README.org. Jambunathan points > > to this message, which can help: > > > > http://lists.gnu.org/archive/html/emacs-orgmode/2011-03/msg01460.html > > Here is the relevant variable. > > ,----[ C-h v org-export-odt-styles-file RET ] > | org-export-odt-styles-file is a variable defined in `org-odt.el'. > `---- > > Here is a specific example: > > ,---- > | (setq org-export-odt-styles-file > | '("~/tmp-orgmode/Thu Thong Bao - Trai Ve Nguon XV (2011).odt" > `---- > > I am seeing that customization interface for org-export-odt-styles-file > variable is only partially done. If the customization interface doesn't > do the right thing for you, you can use the setq form temporarily. > > The default styles file used by the odt exporter is: > org-root-dir/contrib/odt/styles/OrgOdtStyles.xml > > There is also an automatic styles file in there. > > If you are interested in customizing the styles you could do this: > > 1. Export test.org to test.odt > > 2. Open test.odt and use the OpenOffice stylist to change the > user-defined styles. The Org-specific user stlyes have `Org' as a > prefix. > > Hint: One can use M-x occur RET Org RET in OrgOdtStyles.xml buffer to > see the Org specific styles. > > Caution: The style-names used in the styles.xml are the style-names > written out in content.xml. So it is important that the style-names > be not changed at all. > > 3. Save the newly styled test.odt as say ~/.emacs.d/org-odt/custom.odt > or ~/.emacs.d/org-odt/custom.ott file. > > 4. Use one of the following: > > 1. Customize org-export-odt-styles-file to the custom.odt or > custom.ott file. > > 2. If you are a bit adventurous, you can open the newly saved > test.odt in an archive-mode, extract the styles.xml and save it to > ~/.emacs.d/org-odt/user-styles.xml. > > Then customize org-export-odt-styles-file to point to the above > styles.xml file. > > I anticipate more questions and follow-on enhancements to styles > interface as more and more people start using it. So all inputs are > welcome. > > Jambunathan K. > > > > > HTH, Hi, First of all; I want to thank you for this great addon to org-mode. Being able to export directly to OpenOffice documents is good for sharing my document with friends. I just want to add one point that I did not find in the org-manual. I tested some of my org-files and exported them to the OpenOffice format. When I tried to open these documents in OpenOffice, they were corrupt and could not be opened. I soon found out why. If you want to export an org-mode file to .odt, you need to explicitly set the file encoding to UTF-8 (I usually use iso-8859-1 encoding for my files), like: #-*- mode: org; coding: utf-8; -*- After that OpenOffice could open the files without any problems. Thanx again, and I will follow your explanation below, to create my own styles.xml Ciao, Renzo