[-- 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 --]
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–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 --
[-- 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 --]