emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Error in export to odt
@ 2012-11-14 11:08 Rainer M Krug
  2012-11-14 12:46 ` Jambunathan K
  0 siblings, 1 reply; 3+ messages in thread
From: Rainer M Krug @ 2012-11-14 11:08 UTC (permalink / raw)
  To: Emacs-orgmode

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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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.

I attach the tmp.odt with the error.

Libre Office - Version 3.6.2.2 (Build ID: 360m1(Build:2))
Ubuntu Quantal

Cheers,

Rainer

- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys.
(Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer@krugs.de

Skype:      RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlCje64ACgkQoYgNqgF2egqjRgCfWvnkIs8lelZZC5x+i4dpG683
nqAAnArpg16etKE6NkCJlqYPg0Yz+/3u
=eF5T
-----END PGP SIGNATURE-----

[-- Attachment #2: tmp.odt --]
[-- Type: application/vnd.oasis.opendocument.text, Size: 9948 bytes --]

[-- Attachment #3: tmp.odt.sig --]
[-- Type: application/pgp-signature, Size: 72 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Error in export to odt
  2012-11-14 11:08 Error in export to odt Rainer M Krug
@ 2012-11-14 12:46 ` Jambunathan K
  2012-11-14 13:08   ` Rainer M Krug
  0 siblings, 1 reply; 3+ messages in thread
From: Jambunathan K @ 2012-11-14 12:46 UTC (permalink / raw)
  To: Rainer; +Cc: Emacs-orgmode

Rainer M Krug <r.m.krug@gmail.com> 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 

    "\\([^\\]\\|^\\)\\([_^]\\)\\(\\({\\([^{}]*?\\|\\(?:[^{}]*?{[^{}]*?}\\)+[^{}]*?\\|\\(?:[^{}]*?{\\(?:[^{}]*?{[^{}]*?}\\)+[^{}]*?}\\)+[^{}]*?\\)}\\)\\|\\((\\([^()]*?\\|\\(?:[^()]*?([^()]*?)\\)+[^()]*?\\|\\(?:[^()]*?(\\(?:[^()]*?([^()]*?)\\)+[^()]*?)\\)+[^()]*?\\))\\)\\|\\(\\(?:\\*\\|[-+]?[^-+*!@#$%^_ 	\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

-- 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Error in export to odt
  2012-11-14 12:46 ` Jambunathan K
@ 2012-11-14 13:08   ` Rainer M Krug
  0 siblings, 0 replies; 3+ messages in thread
From: Rainer M Krug @ 2012-11-14 13:08 UTC (permalink / raw)
  To: Jambunathan K; +Cc: Emacs-orgmode

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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 14/11/12 13:46, Jambunathan K wrote:
> Rainer M Krug <r.m.krug@gmail.com> 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.

OK - this is fine with me - then I will use 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.

No problem - from my side, no fix needed - I just got the new exporter to work and the result is fine.

SNIP

> 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.
> 


Hm - I never had the any require for org-odt in my .emacs? Now I have the one for org-e-odt...

Thanks,

Rainer

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


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys.
(Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer@krugs.de

Skype:      RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlCjl8oACgkQoYgNqgF2egp3CACfVxacN8Y3N8VfjrFGcsZZ6qEb
WP0An01g3Iz0tKpJtuq4tnHOXz3kXTQh
=OSOo
-----END PGP SIGNATURE-----

[-- Attachment #2: tmpNew.odt --]
[-- Type: application/vnd.oasis.opendocument.text, Size: 9594 bytes --]

[-- Attachment #3: tmpNew.odt.sig --]
[-- Type: application/pgp-signature, Size: 72 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-11-14 13:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-14 11:08 Error in export to odt Rainer M Krug
2012-11-14 12:46 ` Jambunathan K
2012-11-14 13:08   ` Rainer M Krug

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).