From mboxrd@z Thu Jan 1 00:00:00 1970 From: Georg Lehner Subject: Open Document Exporter Date: Mon, 24 Jun 2013 23:29:15 +0200 Message-ID: <51C8BA2B.8010509@magma.com.ni> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54152) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrEm4-0001XU-O5 for emacs-orgmode@gnu.org; Mon, 24 Jun 2013 17:58:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrEm0-0007nt-K2 for emacs-orgmode@gnu.org; Mon, 24 Jun 2013 17:58:12 -0400 Received: from home.umim.anteris.net ([88.198.75.67]:46105) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrEm0-0006mb-4O for emacs-orgmode@gnu.org; Mon, 24 Jun 2013 17:58:08 -0400 Received: from cpe90-146-159-28.liwest.at (HELO [192.168.173.13]) (jorge@magma.com.ni@[90.146.159.28]) (envelope-sender ) by home.umim.anteris.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 24 Jun 2013 21:49:35 -0000 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 Hello List! I am doing a lot of technical documentation with org-mode - until now primarily with the LaTeX (pdflatex) converter (Version 8.0.3 and git head respectively). Now I have started to use the odt-exporter since my co-workers need something ... compatible. It is working very well for me, however I would like to fine-tune several things: 1. content.xml changed on disk ================== At the end of the export process I get the message: content.xml changed on disk; really edit the buffer? (y, n, r or C-h) Please type y, n or r; or ? for help After typing 'y', I have to reconfirm with 'yes' and then with 'y' again to get a valid export. Any tips how to fix or avoid this? 2. Blank lines after headlines ================= After each headline I get a blank line. Can these be suppressed? I'd like to control the separation between headline and text by styles and not by extra lines. 3. Internal links exporting as numbers ====================== In LaTeX export I have the following behaviour: [[*Headline][Headline]] converts to a Hyperlink to the respective headline with description text 'Headline'. [[*Headline]] converts to the respective headline number In ODT export both convert to the headline number. I believe to have this tracked down to the 'org-odt-link' function in ox-odt.el where the first link form seems to fall through to 'org-odt-link--infer-description'. If the link description differs from the fuzzy link, eg. [[*Headline][ Headline]] then the export happens inside the 'org-odt-link' function and works well - of course LaTeX export then shows the extra space. The code in ox-odt.el seems to be based loosely on ox-latex.el's 'org-latex-link' function, however seems more contrincated. My Lisp skills are far from being able to spot the right place to fix this behavior. Any help is highly appreciated. 4. Description Lists =========== These are exported "HTML"-like similar to: *definition 1* text 1 * definition 2* text 2 Where each definition element is an unnumbered list item without bullet and each text element is an unnumbered sublist item also without bullet. Of course I would like to have the definition lists formatted LaTeX-like: *definition 1*and text 1 with hanging indent *definition 2*text 2 And have tried to mangle around in the 'org-odt--translate-description-lists' function, however I failed bitterly to get out something useful. I understand that I have to boldface the description (don't know how to do this on the parsed tree) and concatenate somehow the definition text - recursively, because it could have nested text-material. Any hints where to go? 5. Smart-Quotes cannot be disabled ===================== The following patch disables smart-quotes when required so by a ':nil option. The (when ... clause was missing from the original code. --- SparkleShare/jorge/emacs/lib/org-8.0.3/lisp/ox-odt.el 2013-06-24 22:13:27.000000000 +0200 +++ progs/org-mode/lisp/ox-odt.el 2013-06-22 21:53:27.000000000 +0200 @@ -2967,8 +2967,7 @@ (setq output (org-odt--encode-plain-text output t)) ;; Handle smart quotes. Be sure to provide original string since ;; OUTPUT may have been modified. - (when (plist-get info :with-smart-quotes) - (setq output (org-export-activate-smart-quotes output :utf-8 info text))) + (setq output (org-export-activate-smart-quotes output :utf-8 info text)) ;; Convert special strings. (when (plist-get info :with-special-strings) (mapc 6. Table caption does not translate ==================== I have expanded the 'org-export-dictionary' constant with german (and spanisch) translations of all keywords. However my table captions still show the englisch "Table" prefix. With Figures (alias 'Illustrations' in ODT) things work fine. - - - Best Regards, Georg Lehner Please find below the diff to current (yesterdays) ox.el with the translations. diff -u SparkleShare/jorge/emacs/lib/org-8.0.3/lisp/ox.el progs/org-mode/lisp/ox.el --- SparkleShare/jorge/emacs/lib/org-8.0.3/lisp/ox.el 2013-06-22 21:55:54.000000000 +0200 +++ progs/org-mode/lisp/ox.el 2013-06-22 21:40:52.000000000 +0200 @@ -5260,19 +5260,15 @@ ("zh-CN" :html "日期" :utf-8 "日期") ("zh-TW" :html "日期" :utf-8 "日期")) ("Equation" - ("fr" :ascii "Equation" :default "Équation") - ("de" :default "Gleichung") - ("es" :html "Ecuación" :default "Ecuación")) - ("Figure" - ("de" :default "Abbildung") - ("es" :default "Figura")) + ("fr" :ascii "Equation" :default "Équation")) + ("Figure") ("Footnotes" ("ca" :html "Peus de pàgina") ("cs" :default "Pozn\xe1mky pod carou") ("da" :default "Fodnoter") - ("de" :html "Fußnoten" :default "Fußnoten") + ("de" :html "Fußnoten") ("eo" :default "Piednotoj") - ("es" :html "Nota al pie de página" :default "Nota al pie de página") + ("es" :html "Pies de página") ("fi" :default "Alaviitteet") ("fr" :default "Notes de bas de page") ("hu" :html "Lábjegyzet") @@ -5291,41 +5287,26 @@ ("zh-CN" :html "脚注" :utf-8 "脚注") ("zh-TW" :html "腳註" :utf-8 "腳註")) ("List of Listings" - ("fr" :default "Liste des programmes") - ("de" :default "Programmauflistungsverzeichnis") - ("es" :default "Indice de Listados de programas")) + ("fr" :default "Liste des programmes")) ("List of Tables" - ("fr" :default "Liste des tableaux") - ("de" :default "Tabellenverzeichnis") - ("es" :default "Indice de tablas")) + ("fr" :default "Liste des tableaux")) ("Listing %d:" ("fr" :ascii "Programme %d :" :default "Programme nº %d :" - :latin1 "Programme %d :") - ("de" :default "Programmlisting %d") - ("es" :default "Listado de programa %d")) + :latin1 "Programme %d :")) ("Listing %d: %s" ("fr" :ascii "Programme %d : %s" :default "Programme nº %d : %s" - :latin1 "Programme %d : %s") - ("de" :default "Programlisting %d: %s") - ("es" :default "Listado de programa %d: %s") - ) + :latin1 "Programme %d : %s")) ("See section %s" - ("fr" :default "cf. section %s") - ("de" :default "siehe Abschnitt %s") - ("es" :default "vea seccion %s")) + ("fr" :default "cf. section %s")) ("Table %d:" ("fr" - :ascii "Tableau %d :" :default "Tableau nº %d :" :latin1 "Tableau %d :") - ("de" :default "Tabelle %d") - ("es" :default "Tabla %d")) + :ascii "Tableau %d :" :default "Tableau nº %d :" :latin1 "Tableau %d :")) ("Table %d: %s" ("fr" :ascii "Tableau %d : %s" :default "Tableau nº %d : %s" - :latin1 "Tableau %d : %s") - ("de" :default "Tabelle %d: %s") - ("es" :default "Tabla %d: %s")) + :latin1 "Tableau %d : %s")) ("Table of Contents" ("ca" :html "Índex") ("cs" :default "Obsah") @@ -5351,9 +5332,7 @@ ("zh-CN" :html "目录" :utf-8 "目录") ("zh-TW" :html "目錄" :utf-8 "目錄")) ("Unknown reference" - ("fr" :ascii "Destination inconnue" :default "Référence inconnue") - ("de" :default "Unbekannter Verweis") - ("es" :default "referencia desconocida"))) + ("fr" :ascii "Destination inconnue" :default "Référence inconnue"))) "Dictionary for export engine. Alist whose CAR is the string to translate and CDR is an alist