From: Jambunathan K <kjambunathan@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH 1/2] org-odt: Improve customization of org-export-odt-styles-file
Date: Fri, 22 Jul 2011 20:08:32 +0530 [thread overview]
Message-ID: <81wrfafkif.fsf_-_@gmail.com> (raw)
In-Reply-To: <81oc0w9jie.fsf@gmail.com> (Jambunathan K.'s message of "Fri, 15 Jul 2011 11:24:01 +0530")
[-- Attachment #1: Type: text/plain, Size: 272 bytes --]
> 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 attached patch takes care of the above "issue".
[-- Attachment #2: 0001-org-odt-Improve-customization-of-org-export-odt-styl.patch --]
[-- Type: text/plain, Size: 3751 bytes --]
From fe6cc741850cdfca4bd9577430f744208957e3eb Mon Sep 17 00:00:00 2001
From: Jambunathan K <kjambunathan@gmail.com>
Date: Fri, 22 Jul 2011 16:37:33 +0530
Subject: [PATCH 1/2] org-odt: Improve customization of org-export-odt-styles-file
* contrib/lisp/org-odt.el (org-odt-data-dir)
(org-export-odt-automatic-styles-file): Update docstring.
(org-export-odt-use-bookmarks-for-internal-links): Update
docstring. Improve customization interface.
---
contrib/lisp/org-odt.el | 60 ++++++++++++++++++++++++++++++++++++----------
1 files changed, 47 insertions(+), 13 deletions(-)
diff --git a/contrib/lisp/org-odt.el b/contrib/lisp/org-odt.el
index ea4e32b..c1c5b7f 100644
--- a/contrib/lisp/org-odt.el
+++ b/contrib/lisp/org-odt.el
@@ -73,7 +73,16 @@
(cond
((file-directory-p dir1) dir1)
((file-directory-p dir2) dir2)
- (t (error "Cannot find factory styles file. Check package dir layout")))))
+ (t (error "Cannot find factory styles file. Check package dir layout"))))
+ "Directory that holds auxiliary files used by the ODT exporter.
+
+The 'styles' subdir contains the following xml files -
+ 'OrgOdtStyles.xml' and 'OrgOdtAutomaticStyles.xml' - which are
+ used as factory settings of `org-export-odt-styles-file' and
+ `org-export-odt-automatic-styles-file'.
+
+The 'etc/schema' subdir contains rnc files for validating of
+OpenDocument xml files.")
(defvar org-odt-file-extensions
'(("odt" . "OpenDocument Text")
@@ -135,22 +144,47 @@
(org-lparse-register-backend 'odt)
(defcustom org-export-odt-automatic-styles-file nil
- "Default style file for use with ODT exporter."
+ "Automatic styles for use with ODT exporter.
+If unspecified, the file under `org-odt-data-dir' is used."
:type 'file
:group 'org-export-odt)
-;; TODO: Make configuration user-friendly.
(defcustom org-export-odt-styles-file nil
- "Default style file for use with ODT exporter.
-Valid values are path to an styles.xml file or a path to a valid
-*.odt or a *.ott file or a list of the form (FILE (MEMBER1
-MEMBER2 ...)). In the last case, the specified FILE is unzipped
-and MEMBER1, MEMBER2 etc are copied in to the generated odt
-file. The last form is particularly useful if the styles.xml has
-reference to additional files like header and footer images.
-"
- :type 'file
- :group 'org-export-odt)
+ "Default styles file for use with ODT export.
+Valid values are one of:
+1. nil
+2. path to a styles.xml file
+3. path to a *.odt or a *.ott file
+4. list of the form (ODT-OR-OTT-FILE (FILE-MEMBER-1 FILE-MEMBER-2
+...))
+
+In case of option 1, an in-built styles.xml is used. See
+`org-odt-data-dir' for more information.
+
+In case of option 3, the specified file is unzipped and the
+styles.xml embedded therein is used.
+
+In case of option 4, the specified ODT-OR-OTT-FILE is unzipped
+and FILE-MEMBER-1, FILE-MEMBER-2 etc are copied in to the
+generated odt file. Use relative path for specifying the
+FILE-MEMBERS. styles.xml must be specified as one of the
+FILE-MEMBERS.
+
+Use options 1, 2 or 3 only if styles.xml alone suffices for
+achieving the desired formatting. Use option 4, if the styles.xml
+references additional files like header and footer images for
+achieving the desired formattting."
+ :group 'org-export-odt
+ :type
+ '(choice
+ (const :tag "Factory settings" nil)
+ (file :must-match t :tag "styles.xml")
+ (file :must-match t :tag "ODT or OTT file")
+ (list :tag "ODT or OTT file + Members"
+ (file :must-match t :tag "ODF Text or Text Template file")
+ (cons :tag "Members"
+ (file :tag " Member" "styles.xml")
+ (repeat (file :tag "Member"))))))
(defconst org-export-odt-tmpdir-prefix "odt-")
(defconst org-export-odt-bookmark-prefix "OrgXref.")
--
1.7.2.3
next prev parent reply other threads:[~2011-07-22 14:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-13 13:20 question about ODT export behavior Rainer Stengele
2011-07-13 14:23 ` Bastien
2011-07-13 15:04 ` Rainer Stengele
2011-07-13 16:14 ` Bastien
2011-07-13 20:18 ` Jambunathan K
2011-07-13 16:55 ` Jambunathan K
2011-07-13 20:15 ` Jambunathan K
2011-07-14 6:50 ` Rainer Stengele
2011-07-14 15:44 ` Bastien
2011-07-15 5:54 ` Jambunathan K
2011-07-15 20:34 ` Renzo Been
2011-07-16 20:13 ` ODT Charset/Encoding issues (was question about ODT export behavior) Jambunathan K
2011-07-17 14:12 ` Renzo Been
2011-07-17 19:13 ` Jambunathan K
2011-07-18 8:59 ` Bastien
2011-07-22 14:38 ` Jambunathan K [this message]
2011-07-22 15:49 ` [PATCH 1/2] org-odt: Improve customization of org-export-odt-styles-file Bastien
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=81wrfafkif.fsf_-_@gmail.com \
--to=kjambunathan@gmail.com \
--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).