Re: [O] Bug: Bad ODT files when including multiple images [7.9.3f (release_7.9.3f-17-g7524ef /usr/share/emacs/24.3/lisp/org/)]

2013-12-23 Thread Tim
At Thu, 19 Dec 2013 00:43:57 +0530,
Jambunathan K wrote:
> 
> The following message is a courtesy copy of an article
> that has been posted to gmane.emacs.orgmode as well.
> 
> 
> The fix is available in private repository:
> 
> http://repo.or.cz/w/org-mode/org-kjn.git

I was able to download the relevant files and my export now works as expected.

Thank you very much !!

Happy Holidays.

-Tim



Re: [O] Bug: Bad ODT files when including multiple images [7.9.3f (release_7.9.3f-17-g7524ef /usr/share/emacs/24.3/lisp/org/)]

2013-12-18 Thread Jambunathan K

The fix is available in private repository:

http://repo.or.cz/w/org-mode/org-kjn.git

As far as schema validation with .rnc files go, draw:name is an optional
attribute of draw:frame.  So, I am not sure why LibreOffice is insisting
on draw:name to exist and be unique.

Due to the above issue, I have also retired the support for
short-caption.



See my not pertaining to LibreOffice upgrades here:

http://lists.gnu.org/archive/html/emacs-orgmode/2013-12/msg00477.html

Due to this issue, I proposed that I maintain ox-odt.el right within
Emacs bzr repo.  Unfortunately, it resulted in some heated exchanges.

   http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00509.html


To the people who rely on ODT exporter for their day to day use and want
it as part of Emacs

1. Find someone with Copyright Assignment to fix the critical issue(s).

2. Write to Gnu/Linux distributors - Debian, Gentoo etc - and persuade
   them to apply patches from my private repo before building the
   org-mode or Emacs deb packages.
   


Download the files.  Don't use git.

The files relevant to ODT are

1. lisp/ox-odt.el
2. etc/styles
3. etc/schema
4. contrib/lisp/ox-jabref.el

(3) above is optional.  (4) is needed if you need export citations with
JabRef.

Tim  writes:

>> Let me upgrade my LibreOffice and report back.
> Jambunathan,
>was wondering if you had a chance to look at this error ?  I can confirm
> it is an issue on my Ubuntu 13.10 system with :
>- emacs 24.3.1
>- org-mode 8.2.4 (org-plus-contrib elpa package 20131216)
>- libreoffice 4.1.3.2
>
> I use the odt export to create student handouts and *really* don't want to go
> back through 200+ documents to add captions to all of the images !
>
> Thanks
>
> -Tim 




Re: [O] Bug: Bad ODT files when including multiple images [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]

2013-12-17 Thread Jambunathan K
Tim  writes:

> Jambunathan,
>was wondering if you had a chance to look at this error ?  I can confirm
> it is an issue on my Ubuntu 13.10 system with :
>- emacs 24.3.1
>- org-mode 8.2.4 (org-plus-contrib elpa package 20131216)
>- libreoffice 4.1.3.2

I can see the problem on my side.

> I use the odt export to create student handouts and *really* don't
> want to go back through 200+ documents to add captions to all of the
> images !

This issue is a bit unfortunate.  Please don't modify your Org files.  I
will circulate a fix - if not a fix, atleast a workaround - in another
day.

Jambunathan K.




Re: [O] Bug: Bad ODT files when including multiple images [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]

2013-12-17 Thread Tim
At Wed, 18 Dec 2013 00:16:25 +0530,
Jambunathan K wrote:
> 
> Tim  writes:
> 
> > Jambunathan,
> >was wondering if you had a chance to look at this error ?  I can confirm
> > it is an issue on my Ubuntu 13.10 system with :
> >- emacs 24.3.1
> >- org-mode 8.2.4 (org-plus-contrib elpa package 20131216)
> >- libreoffice 4.1.3.2
> 
> I can see the problem on my side.
> 
> > I use the odt export to create student handouts and *really* don't
> > want to go back through 200+ documents to add captions to all of the
> > images !
> 
> This issue is a bit unfortunate.  Please don't modify your Org files.  I
> will circulate a fix - if not a fix, atleast a workaround - in another
> day.

Thank you !

-Tim



Re: [O] Bug: Bad ODT files when including multiple images [7.9.3f (release_7.9.3f-17-g7524ef /usr/share/emacs/24.3/lisp/org/)]

2013-12-17 Thread Tim

> Let me upgrade my LibreOffice and report back.
Jambunathan,
   was wondering if you had a chance to look at this error ?  I can confirm
it is an issue on my Ubuntu 13.10 system with :
   - emacs 24.3.1
   - org-mode 8.2.4 (org-plus-contrib elpa package 20131216)
   - libreoffice 4.1.3.2

I use the odt export to create student handouts and *really* don't want to go
back through 200+ documents to add captions to all of the images !

Thanks

-Tim 



Re: [O] Bug: Bad ODT files when including multiple images [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]

2013-12-17 Thread Tim
At Tue, 03 Dec 2013 21:17:06 +0530,
Jambunathan K wrote:
> 
> Let me upgrade my LibreOffice and report back.
> 
Jambunathan,
   was wondering if you had a chance to look at this error ?  I can confirm
it is an issue on my Ubuntu 13.10 system with :
   - emacs 24.3.1
   - org-mode 8.2.4 (org-plus-contrib elpa package 20131216)
   - libreoffice 4.1.3.2

I use the odt export to create student handouts and *really* don't want to go
back through 200+ documents to add captions to all of the images !

Thanks

-Tim 



Re: [O] Bug: Bad ODT files when including multiple images [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]

2013-12-04 Thread Jambunathan K
Christian Moe  writes:

> This problem was also reported by Tyler Smith a couple of weeks back.

I was able to open test.odt provided by Tyler just fine.  Hence I did
not follow up the post (IIRC, Christian was also indicating a "no
issue".)

http://permalink.gmane.org/gmane.emacs.orgmode/78579

I am using LibreOffice 4.0.1.2.

Tyler says he is using 4.0.4.2.  OP is using LibreOffice-4.1.3.2.  Is it
a problem only with recent LibreOffices?

Let me upgrade my LibreOffice and report back.












Re: [O] Bug: Bad ODT files when including multiple images [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]

2013-12-03 Thread Christian Moe

Enrico Scholz writes:

>> It seems LibreOffice 4.1 now requires that draw:frame elements wrapping
>> images be uniquely named with the draw:name attribute if there's more
>> than one of them.
>> ...
>> So we may need a fix for the corner case of identical captions as
>> well.
>
> Why do we need meaningful 'draw:name' values at all?  And why use the
> caption for it?  Just adding 'draw:name="Image%u"' and incrementing the
> index after each use seems to be enough.

Indeed, that sounds like a simple all-round fix, and better than one
solution for uncaptioned images and a fragile one for captioned
ones. Did a quick test replacing the draw:name attributes for captioned
images with such generic names, and it didn't seem to cause any
problems.

> Alternatively, '#+NAME:' seems to be a much better choice than
> #+CAPTION.

But not a good one, since users do not necessarily name images.

Yours,
Christian






Re: [O] Bug: Bad ODT files when including multiple images [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]

2013-12-03 Thread Enrico Scholz
Christian Moe  writes:

> It seems LibreOffice 4.1 now requires that draw:frame elements wrapping
> images be uniquely named with the draw:name attribute if there's more
> than one of them.
> ...
> So we may need a fix for the corner case of identical captions as
> well.

Why do we need meaningful 'draw:name' values at all?  And why use the
caption for it?  Just adding 'draw:name="Image%u"' and incrementing the
index after each use seems to be enough.

Alternatively, '#+NAME:' seems to be a much better choice than
#+CAPTION.


Enrico



Re: [O] Bug: Bad ODT files when including multiple images [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]

2013-12-03 Thread Christian Moe

Hi,

This problem was also reported by Tyler Smith a couple of weeks back. I
confirmed it and did a little checking. Unfortunately I also sort of
promised a patch, which I never got around to. 

Instead, let me report what I've found about the syntax:

It seems LibreOffice 4.1 now requires that draw:frame elements wrapping
images be uniquely named with the draw:name attribute if there's more
than one of them.

Multiple uncaptioned images fail because Org currently wraps them in
frames without these attributes.

e.g. a simple document containing

  [[file:test1.jpg]]

  [[file:test2.jpg]]

results in unnamed image frames, e.g. for the first image of the
example:

  

   

  

This now results in a read error in LibreOffice 4.1. LibreOffice uses
draw:name="graphics1", "graphics2" etc. for the draw:frame element when
a picture is inserted, but I think any unique value will do.

The problem does not occur if you add captions to the images. Then the
draw:frame gets a draw:name attribute containing the caption text.

e.g. 

  #+caption: A picture
  [[file:test1.jpg]]

  #+caption: Another picture
  [[file:test2.jpg]]

exports without a problem, because it results in draw:frame elements
like (for the first picture of the example):

  
  ^
  
However, this only works as long as each caption is unique. If you have
more than one image with identical #+captions, even if they have different
#+names, you get the read error. 

So we may need a fix for the corner case of identical captions as well.

I haven't checked what other elements may be affected by similar new
requirements besides images.

Yours,
Christian






Re: [O] Bug: Bad ODT files when including multiple images [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]

2013-12-03 Thread Enrico Scholz
Jambunathan K  writes:

> If problem persists with new exporter, let me know.  I will be happy to
> share a fix.

yes; reproduced with

Org-mode version 8.2.3c (8.2.3c-17-gc92606-elpa @ 
/home/ensc/.emacs.d/elpa/org-20131202/)



Enrico



Re: [O] Bug: Bad ODT files when including multiple images [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]

2013-12-02 Thread Enrico Scholz
Jambunathan K  writes:

>M-x list-packages
>
> and install the org package.

this seems to be completely broken: export by C-c C-e o o fails with

| OpenDocument export failed: Invalid function: org-with-silent-modifications


> If problem persists with new exporter, let me know.  I will be happy to
> share a fix.

>From reading ox-odt.el, it is very likely that it still exists.  There
is no place except with short-caption where 'draw:name' will be set.



Enrico



Re: [O] Bug: Bad ODT files when including multiple images [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]

2013-12-02 Thread Jambunathan K

> 7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]

The exporter(s) are re-written.  You should be using Org-8.*.

Use Elpa

   M-x list-packages

and install the org package.

or install from tar file or git.


orgmode.org/worg has instructions on how to use the "new exporters".

If problem persists with new exporter, let me know.  I will be happy to
share a fix.

Enrico Scholz  writes:

> Hi,
>
> org-mode generates ODT files which can not be opened by libreoffice-4.1.3.2
> when more than one image is included. E.g. running (org-export-as-odt) on
>
>  test.org ---
> * Test
>
> [[file:s01.png]]
>
> [[file:s01.png]]
> -
>
> and trying to open it with 'oowrite test.odt' gives a "Read-Error/Error
> reading file" message.  ODT created after removing one of the images is
> ok.
>
> It seems that libreoffice requires an unique 'draw:name' attribute for
> 'draw:frame' tags.  This can be set by '#+CAPTION' (and the resulting
> ODT is working) but this option is not suitable for inline images.
>
>
>
> Enrico
>
>
> Emacs  : GNU Emacs 24.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 2.24.19)
>  of 2013-08-19 on koji-builder0.intern.sigma-chemnitz.de
> Package: Org-mode version 7.9.3f (release_7.9.3f-17-g7524ef @
> /usr/share/emacs/24.3/lisp/org/)




[O] Bug: Bad ODT files when including multiple images [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]

2013-12-02 Thread Enrico Scholz
Hi,

org-mode generates ODT files which can not be opened by libreoffice-4.1.3.2
when more than one image is included. E.g. running (org-export-as-odt) on

 test.org ---
* Test

[[file:s01.png]]

[[file:s01.png]]
-

and trying to open it with 'oowrite test.odt' gives a "Read-Error/Error
reading file" message.  ODT created after removing one of the images is
ok.

It seems that libreoffice requires an unique 'draw:name' attribute for
'draw:frame' tags.  This can be set by '#+CAPTION' (and the resulting
ODT is working) but this option is not suitable for inline images.



Enrico


Emacs  : GNU Emacs 24.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 2.24.19)
 of 2013-08-19 on koji-builder0.intern.sigma-chemnitz.de
Package: Org-mode version 7.9.3f (release_7.9.3f-17-g7524ef @ 
/usr/share/emacs/24.3/lisp/org/)