emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Error in export to odt


From: Jambunathan K
Subject: Re: [O] Error in export to odt
Date: Wed, 14 Nov 2012 18:16:51 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Rainer M Krug <address@hidden> writes:

> Hi
>
> I am exporting a document to odt (Org-mode version 7.9.2
> (release_7.9.2-459-g6f7e92 @
> /home/rkrug/.emacs.d/org-mode/lisp/) and the odt generates fine, but
> it is corrupt. The simple org
> document looks like followed:
>
> ####
> * Required data / field work
> 100m^2--1000m2
> ####
>
> This results in a "Format error discovered in the file in sub-document
> content.xml at 353,50(row,col)"
>
> simply adding spaces around the "--" solves the problem.

Above example works fine with the new exporter.

Old exporter is pretty much on the way out and I would strongly
recommend that you use the new exporter as much as possible.

          
    (require 'org-e-odt)
    M-x org-export-dispatch RET

That said, this is what happens.  I will accept any suggestions for
possible fix or blindly apply a patch if one would circulate that to me.

Step 1. 100m^2--1000m2
Step 2. 100m^2&#x2013;1000m2
Step 3. 100m<text:span 
text:style-name="OrgSuperscript">2&</text:span>#x2013;1000m2

Step 1 to Step 2 sounds good.  This happens as part of
`org-lparse-convert-special-strings'.

Step 2 to Step is not OK.  Note that the "&" that introduces the `ndash'
gets pulled in as part of subscript.  This happens as part of
`org-lparse-apply-sub-superscript-styles'.

Now `org-match-substring-regexp' which goes something like 

    
"\\([^\\]\\|^\\)\\([_^]\\)\\(\\({\\([^{}]*?\\|\\(?:[^{}]*?{[^{}]*?}\\)+[^{}]*?\\|\\(?:[^{}]*?{\\(?:[^{}]*?{[^{}]*?}\\)+[^{}]*?}\\)+[^{}]*?\\)}\\)\\|\\((\\([^()]*?\\|\\(?:[^()]*?([^()]*?)\\)+[^()]*?\\|\\(?:[^()]*?(\\(?:[^()]*?([^()]*?)\\)+[^()]*?)\\)+[^()]*?\\))\\)\\|\\(\\(?:\\*\\|address@hidden
     \n,:\"?<>~;./{}=()]+\\)\\)\\)"

looks like a swear word to me :-).  Frankly, I don't know or care about
latex-ism.

I am not sure whether there is a bug in that regexp or the regexp is
doing the right thing but that a `org-protected' property should be
applied to some part of the string that is undergoing transformation.

If someone can make sense out of what is happening and if I happen to
trust the other person's judgment, then this bug has some hope of
getting addressed.  Otherwise, this bug will remain un-fixed.

But, I am sure what a ndash is doing in a Math expression.  May be it is
a minus-that-is-aspiring-to-be-a-ndash, I don't know.

Anyways, try the new exporter.  


One warning though:

Make sure that you require ONLY ONE of org-odt and org-e-odt in your
.emacs.  If you require them simulatneously org-odt will not be usable.
There is some error which I haven't had time to investigate.

> I attach the tmp.odt with the error.
>
> Libre Office - Version 3.6.2.2 (Build ID: 360m1(Build:2))
> Ubuntu Quantal
>
> Cheers,
>
> Rainer

-- 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]