From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: Bug in odt export of org files with footnotes Date: Wed, 29 Feb 2012 20:25:51 +0530 Message-ID: <814nu97kp4.fsf@gmail.com> References: <1330500236.1950.13.camel@quino> <814nuam1v2.fsf@gmail.com> <1330509244.1950.22.camel@quino> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:52703) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2kx8-0002zg-DP for emacs-orgmode@gnu.org; Wed, 29 Feb 2012 09:56:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2kww-0007Xw-8W for emacs-orgmode@gnu.org; Wed, 29 Feb 2012 09:56:25 -0500 Received: from mail-pw0-f41.google.com ([209.85.160.41]:52360) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2kwv-0007XX-Rx for emacs-orgmode@gnu.org; Wed, 29 Feb 2012 09:56:14 -0500 Received: by pbbro12 with SMTP id ro12so895916pbb.0 for ; Wed, 29 Feb 2012 06:56:11 -0800 (PST) In-Reply-To: <1330509244.1950.22.camel@quino> ("Martin \=\?utf-8\?Q\?G\=C3\=BCrt\?\= \=\?utf-8\?Q\?ler\=22's\?\= message of "Wed, 29 Feb 2012 10:54:04 +0100") 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: Martin =?utf-8?Q?G=C3=BCrtler?= Cc: Nicolas Goaziou , emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Martin I am attaching a patch that should fix this issue. I will let Nicolas review/apply it. ps: If you are not comfortable applying patches, the best way to get things working again, is to force a blank line before the first non-commented line in your Org file i.e., replace --8<---------------cut here---------------start------------->8--- [snip] #+XSLT: * Protocol --8<---------------cut here---------------end--------------->8--- with --8<---------------cut here---------------start------------->8--- [snip] #+XSLT: * Protocol --8<---------------cut here---------------end--------------->8--- in the test file that you circulated. --=-=-= Content-Type: text/x-org; charset=utf-8 Content-Disposition: attachment; filename=test.org Content-Transfer-Encoding: quoted-printable Content-Description: test.org #+TITLE: test.org #+AUTHOR: Martin G=C3=BCrtler #+EMAIL: none@none #+DATE: 2012-02-29 Wed #+DESCRIPTION: #+KEYWORDS: #+LANGUAGE: de #+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:nil #+OPTIONS: TeX:t LaTeX:dvipng skip:nil d:nil todo:t pri:nil tags:not-in-t= oc #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http:/= /orgmode.org/org-info.js #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport #+LINK_UP:=20=20=20 #+LINK_HOME:=20 #+XSLT: * Protocol ** System description The software system provides the following numbers:[fn:1] - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 It also provides letters[fn:2]: - q - w - e - r - t - z - u - i ** Another subsection Just to have some more words... * Footnotes [fn:1] footnote [fn:2] testing --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-org-footnote-Workaround-a-limitation-in-the-ODT-expo.patch Content-Description: org-footnote.patch >From d09cc7bb3bdb1b32b32fae14b722f4d4c8b0ef79 Mon Sep 17 00:00:00 2001 From: Jambunathan K Date: Wed, 29 Feb 2012 20:09:44 +0530 Subject: [PATCH] org-footnote: Workaround a limitation in the ODT exporter * lisp/org-footnote.el (org-footnote-normalize): Force a paragraph break after the last footnote definition. This is an an implicit assumption made by the org-lparse.el library. With this change, footnote definitions can reliably be exported with ODT backend. See http://lists.gnu.org/archive/html/emacs-orgmode/2012-02/msg01013.html. --- lisp/org-footnote.el | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el index c848bae..f4ea7ff 100644 --- a/lisp/org-footnote.el +++ b/lisp/org-footnote.el @@ -810,7 +810,7 @@ Additional note on `org-footnote-insert-pos-for-preprocessor': (lambda (x) (format "\n[%s] %s" (nth (if sort-only 0 1) x) (nth 2 x))) ref-table "\n")) - (unless (eobp) (insert "\n")) + (unless (eobp) (insert "\n\n")) ;; When exporting, add newly inserted markers along with their ;; associated definition to `org-export-footnotes-seen'. (when export-props (setq org-export-footnotes-seen ref-table))) -- 1.7.5.1 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Martin G=C3=BCrtler writes: > Hi, > > thanks for quick response. > > Am Mittwoch, den 29.02.2012, 14:51 +0530 schrieb Jambunathan K: >> Martin G=C3=BCrtler writes: >>=20 >> I am not sure what version of Orgmode this corresponds to...What does >> M-x org-version RET say. > 7.8.03, I use elpa. > >> > There, the export of documents with footnotes seems to be broken.=20 >>=20 >> Footnote export in ODT was known to be broken[1] with the following is >> true: >>=20 >> ,---- >> | (setq org-footnote-section nil) >> `---- >>=20 >> May I know what value do you use one your end? > C-h v says org-footnote-section's value is "Footnotes" which seems to > be default and not the case you mention. >> Providing a complete Org file (with footnotes) is necessary so that >> there is no confusion on what we are looking at. >>=20 >> With a footnotes added, I was able to export just fine with the version >> of Org in the git repo. > In my case, section 1.1 is missing. I attach the org file with footnote > and the resulting odt. > > Cheers, > > Martin --=-=-=--