* Bug in odt export of org files with footnotes
@ 2012-02-29 7:23 Martin Gürtler
2012-02-29 9:21 ` Jambunathan K
0 siblings, 1 reply; 7+ messages in thread
From: Martin Gürtler @ 2012-02-29 7:23 UTC (permalink / raw)
To: emacs-orgmode
Hi,
I started using the new odt export feature of org mode, and it turns out
to be very useful, and I am very pleased with the results. I am using
the latest version available with the package manager of emacs-snapshot
in debian (20120216).
There, the export of documents with footnotes seems to be broken.
A minimal document is provided at end. It exports without problems . As
soon as I add a footnote (say, at the end of "The software
system...numbers:", the exported document breaks. It can still be opened
in libreoffice, but a complete section is missing. In a more complex
document, libreoffice crashed when trying to open the document, and I
recognised missing closing xml tags in content.xml.
Regards,
Martin
#+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:nil skip:nil d:nil todo:t pri:nil
#+OPTIONS tags:not-in-toc
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+LINK_UP:
#+LINK_HOME:
#+XSLT:
* Protocol
** System description
The software system provides the following numbers:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
It also provides letters:
- q
- w
- e
- r
- t
- z
- u
- i
** Another subsection
Just to have some more words...
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Bug in odt export of org files with footnotes
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
0 siblings, 1 reply; 7+ messages in thread
From: Jambunathan K @ 2012-02-29 9:21 UTC (permalink / raw)
To: Martin Gürtler; +Cc: emacs-orgmode
Martin Gürtler <martin.guertler@gmx.de> writes:
> Hi,
>
> I started using the new odt export feature of org mode, and it turns out
> to be very useful, and I am very pleased with the results. I am using
> the latest version available with the package manager of emacs-snapshot
> in debian (20120216).
I am not sure what version of Orgmode this corresponds to...What does
M-x org-version RET say.
If Debian picks from Emacs-24.1 bzr repo then the Orgmode there is
atleast 2 months old.
If they are picking up from GNU ELPA, http://elpa.gnu.org/packages/ then
it is likely to be fairly recent.
> 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?
[1] http://lists.gnu.org/archive/html/emacs-orgmode/2012-02/msg00124.html
> A minimal document is provided at end. It exports without problems .
> As soon as I add a footnote (say, at the end of "The software
> system...numbers:", the exported document breaks. It can still be
> opened in libreoffice, but a complete section is missing.
Could you please try out the earlier suggestions?
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 a more complex document, libreoffice crashed when trying to open
> the document, and I recognised missing closing xml tags in
> content.xml.
To debug such issues see FAQ and Org manual.
- http://orgmode.org/worg/org-faq.html#debugging-org-odt
- (info "(org) Validating OpenDocument XML")
You most likely need OpenDocument schema files available for validation
to proceed. This you can confirm by checking the value of:
C-h v org-export-odt-schema-dir
or visiting the directory
C-h v org-odt-data-dir
ODF schema files are available from the git repo. See link below. Make
sure you download the files in raw form.
http://orgmode.org/w/?p=org-mode.git;a=tree;f=contrib/odt/etc/schema;hb=HEAD
Let me know how things go.
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Bug in odt export of org files with footnotes
2012-02-29 9:21 ` Jambunathan K
@ 2012-02-29 9:54 ` Martin Gürtler
2012-02-29 14:55 ` Jambunathan K
0 siblings, 1 reply; 7+ messages in thread
From: Martin Gürtler @ 2012-02-29 9:54 UTC (permalink / raw)
To: Jambunathan K; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 982 bytes --]
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
[-- Attachment #2: test.odt --]
[-- Type: application/vnd.oasis.opendocument.text, Size: 9849 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: test.org --]
[-- Type: text/plain; name="test.org"; charset="UTF-8", Size: 813 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:
- q
- w
- e
- r
- t
- z
- u
- i
** Another subsection
Just to have some more words...
* Footnotes
[fn:1] footnote
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Bug in odt export of org files with footnotes
2012-02-29 9:54 ` Martin Gürtler
@ 2012-02-29 14:55 ` Jambunathan K
2012-02-29 22:07 ` Nicolas Goaziou
2012-03-01 8:13 ` Bug: odt export of footnotes inside plain lists; WAS " Martin Gürtler
0 siblings, 2 replies; 7+ messages in thread
From: Jambunathan K @ 2012-02-29 14:55 UTC (permalink / raw)
To: Martin Gürtler; +Cc: Nicolas Goaziou, emacs-orgmode
[-- 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.
---
| 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
--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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: Bug in odt export of org files with footnotes
2012-02-29 14:55 ` Jambunathan K
@ 2012-02-29 22:07 ` Nicolas Goaziou
2012-03-01 8:13 ` Bug: odt export of footnotes inside plain lists; WAS " Martin Gürtler
1 sibling, 0 replies; 7+ messages in thread
From: Nicolas Goaziou @ 2012-02-29 22:07 UTC (permalink / raw)
To: Jambunathan K; +Cc: emacs-orgmode, Martin Gürtler
Hello,
Jambunathan K <kjambunathan@gmail.com> writes:
> I am attaching a patch that should fix this issue. I will let Nicolas
> review/apply it.
Ok, I have applied it.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 7+ messages in thread
* Bug: odt export of footnotes inside plain lists; WAS Bug in odt export of org files with footnotes
2012-02-29 14:55 ` Jambunathan K
2012-02-29 22:07 ` Nicolas Goaziou
@ 2012-03-01 8:13 ` Martin Gürtler
2012-03-01 14:09 ` Jambunathan K
1 sibling, 1 reply; 7+ messages in thread
From: Martin Gürtler @ 2012-03-01 8:13 UTC (permalink / raw)
To: Jambunathan K; +Cc: Nicolas Goaziou, emacs-orgmode
Am Mittwoch, den 29.02.2012, 20:25 +0530 schrieb Jambunathan K:
> Martin
>
> I am attaching a patch that should fix this issue. I will let Nicolas
> review/apply it.
>
This fixed the minimal example I provided yesterday. There is another
issue, however, with footnotes inside plain lists.
minimal example:
--8<--------
#+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
#+OPTIONS: tags:not-in-toc
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+LINK_UP:
#+LINK_HOME:
#+XSLT:
* Headline
- text [fn:1]
* Footnotes
[fn:1] footnote
--8<------------
This cannot be opened in libreoffice. The relevant part in content.xml
looks
--8<--------------
<text:list-item>
<text:p text:style-name="Text_20_body"> text
<text:note text:id="fn1" text:note-class="footnote">
<text:note-citation>1</text:note-citation>
<text:note-body>
<text:p text:style-name="Footnote"> footnote </text:p>
</text:list-item>
--8<--------------
In the empty line, a number of closing tags is missing.
Best regards,
Martin
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-03-01 14:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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).