emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jambunathan K <kjambunathan@gmail.com>
To: "Martin Gürtler" <martin.guertler@gmx.de>
Cc: Nicolas Goaziou <n.goaziou@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Bug in odt export of org files with footnotes
Date: Wed, 29 Feb 2012 20:25:51 +0530	[thread overview]
Message-ID: <814nu97kp4.fsf@gmail.com> (raw)
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")

[-- Attachment #1: Type: text/plain, Size: 646 bytes --]


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.


[-- Attachment #2: test.org --]
[-- Type: text/x-org, Size: 881 bytes --]

#+TITLE:     test.org
#+AUTHOR:    Martin Gürtler
#+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-toc
#+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:   
#+LINK_HOME: 
#+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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: org-footnote.patch --]
[-- Type: text/x-patch, Size: 1250 bytes --]

From d09cc7bb3bdb1b32b32fae14b722f4d4c8b0ef79 Mon Sep 17 00:00:00 2001
From: Jambunathan K <kjambunathan@gmail.com>
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


[-- Attachment #4: Type: text/plain, Size: 1114 bytes --]


Martin Gürtler <martin.guertler@gmx.de> writes:

> Hi,
>
> thanks for quick response.
>
> Am Mittwoch, den 29.02.2012, 14:51 +0530 schrieb Jambunathan K:
>> Martin Gürtler <martin.guertler@gmx.de> writes:
>> 
>> 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. 
>> 
>> Footnote export in ODT was known to be broken[1] with the following is
>> true:
>> 
>> ,----
>> |   (setq org-footnote-section nil)
>> `----
>> 
>> 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.
>> 
>> 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

  reply	other threads:[~2012-02-29 14:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-29  7:23 Bug in odt export of org files with footnotes Martin Gürtler
2012-02-29  9:21 ` Jambunathan K
2012-02-29  9:54   ` Martin Gürtler
2012-02-29 14:55     ` Jambunathan K [this message]
2012-02-29 22:07       ` Nicolas Goaziou
2012-03-01  8:13       ` Bug: odt export of footnotes inside plain lists; WAS " Martin Gürtler
2012-03-01 14:09         ` Jambunathan K

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=814nu97kp4.fsf@gmail.com \
    --to=kjambunathan@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=martin.guertler@gmx.de \
    --cc=n.goaziou@gmail.com \
    /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).