Re: Conversion to doc via pandoc

2012-04-19 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 19/04/12 13:29, Pavel Sanda wrote:
> Rainer M Krug wrote:
>> $ xhtml2odt -i AS_BC_manuscrip.xhtml -o AS_BC_manuscrip.odt Tidy could not 
>> clean up the 
>> document, aborting. Conversion failed. $
>> 
>> So it is not as robust as pandoc - at this point vote for pandoc. Tests will 
>> be ongoing.
> 
> Point for sure, but most important is how good are these guys at preserving 
> structure,
> formats, bibliography, foot/margin notes, math of _correct_ xhtml file...
> 
> If you have some time to make more detailed comparison of nowadays tools 
> ->odt/doc transition 
> for LyX document (having main features cited above) I'm sure many people 
> around would be happy 
> to read the results (perhaps wiki page would be appropriate).

Would be very useful - but at the moment absolutely no time. I just made the 
other comparison, as
I was looking for a useful converter and I found pandoc wich is working very 
nicely with the
document. But I will put it into my TODO list.

Cheers,

Rainer

> 
> Pavel


- -- 
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:  rai...@krugs.de

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

iEYEARECAAYFAk+P+0UACgkQoYgNqgF2egoYqgCdF4432l7EBARf9EeCmQ0Tk/ts
XzQAn2xbKuE9RVzmFrN9VEzjhX1uv1nQ
=7wxa
-END PGP SIGNATURE-


Re: Conversion to doc via pandoc

2012-04-19 Thread Pavel Sanda
Rainer M Krug wrote:
> $ xhtml2odt -i AS_BC_manuscrip.xhtml -o AS_BC_manuscrip.odt
> Tidy could not clean up the document, aborting.
> Conversion failed.
> $
> 
> So it is not as robust as pandoc - at this point vote for pandoc. Tests will 
> be ongoing.

Point for sure, but most important is how good are these guys at preserving 
structure,
formats, bibliography, foot/margin notes, math of _correct_ xhtml file...

If you have some time to make more detailed comparison of nowadays tools 
->odt/doc 
transition for LyX document (having main features cited above) I'm sure many 
people
around would be happy to read the results (perhaps wiki page would be 
appropriate).

Pavel


Re: Conversion to doc via pandoc

2012-04-18 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 17/04/12 17:15, Pavel Sanda wrote:
> Rainer M Krug wrote:
>> Well - LibreOffice gives an error when trying to open the xhtml file, and I 
>> can't open it in
>>  my browser either (seems to be corrupt for this document?). Another 
>> document, produces an 
>> empty output when opening the xhml in LibreOffice.
> 
> From what I know and tried on OpenOffice xhtml import never really worked and 
> it seems no 
> better with OpenOffice: https://bugs.freedesktop.org/show_bug.cgi?id=36977
> 
> Interesting comparison would be between pandoc and http://xhtml2odt.org/ if 
> someone wants to 
> take the step.

Try on the document which produces a non-clean xhtml:


$ xhtml2odt -i AS_BC_manuscrip.xhtml -o AS_BC_manuscrip.odt
Tidy could not clean up the document, aborting.
Conversion failed.
$

So it is not as robust as pandoc - at this point vote for pandoc. Tests will be 
ongoing.

Rainer

> 
>>> There's no reason we couldn't add this as a converter. File a bug to remind 
>>> me if you 
>>> like.
>>> 
>> 
>> I t'll add it top #6042 as Liviu pointed out.
>> 
>> Would be great if pandoc converter could be added, as it seems to be quite 
>> robust in handling
>> even corrupt xhtml files.o
> 
> We already produced patch, but nobody wanted to test them (hint hint).
> 
> Pavel


- -- 
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:  rai...@krugs.de

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

iEYEARECAAYFAk+OZ8sACgkQoYgNqgF2egqx5wCeI3ZMG7krAAjz4+jgVj1Sa5yl
MgYAnR6LmTVUBMcFu09XM6Nlrfn66g/u
=goAW
-END PGP SIGNATURE-


Re: Conversion to doc via pandoc

2012-04-17 Thread Pavel Sanda
Rainer M Krug wrote:
> Well - LibreOffice gives an error when trying to open the xhtml file, and I 
> can't open it in my
> browser either (seems to be corrupt for this document?). Another document, 
> produces an empty
> output when opening the xhml in LibreOffice.

>From what I know and tried on OpenOffice xhtml import never really worked and 
>it seems no better with OpenOffice:
https://bugs.freedesktop.org/show_bug.cgi?id=36977

Interesting comparison would be between pandoc and http://xhtml2odt.org/ if 
someone wants to take the step.

> > There's no reason we couldn't add this as a converter. File a bug to remind 
> > me if you like.
> > 
> 
> I t'll add it top #6042 as Liviu pointed out.
> 
> Would be great if pandoc converter could be added, as it seems to be quite 
> robust in handling even
> corrupt xhtml files.o

We already produced patch, but nobody wanted to test them (hint hint).

Pavel


Re: Conversion to doc via pandoc

2012-04-17 Thread Richard Heck

On 04/17/2012 03:04 AM, Rainer M Krug wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 16/04/12 22:42, Richard Heck wrote:

On 04/16/2012 09:07 AM, Rainer M Krug wrote:

-BEGIN PGP SIGNED MESSAGE- Hash: SHA1

Hi

I just discovered pandoc, and I use it to convert to odt format (and then in 
OpenOffice to
doc).

The conversion goes LyX ->   LyXHTML ->   odt

I defined the following format:

\format "odt lo" "odt" "Libreoffice writer" "" "libreoffice" "libreoffice"
"document,menu=export"

and the following converter:

\converter "xhtml" "odt lo" "pandoc -o $$o $$i" ""


How much better is this than simply exporting LyXHTML and then opening the 
resulting file in
LibreOffice?

Well - LibreOffice gives an error when trying to open the xhtml file, and I 
can't open it in my browser either (seems to be corrupt for this document?). 
Another document, produces an empty output when opening the xhml in LibreOffice.

There are definitely still bugs in the exporter, especially with more 
complicated documents. I think longer term maybe HTML5 would be a better 
target, as it's more robust.


Richard



Re: Conversion to doc via pandoc

2012-04-17 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 16/04/12 22:53, Liviu Andronic wrote:
> On Mon, Apr 16, 2012 at 10:42 PM, Richard Heck  wrote:
>> There's no reason we couldn't add this as a converter. File a bug to remind 
>> me if you like.
>> 
> I guess #6042 [1] serves for this purpose.
> 
> Liviu
> 
> [1] http://www.lyx.org/trac/ticket/6042

Thanks - aded to the ticket.

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:  rai...@krugs.de

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

iEYEARECAAYFAk+NGJYACgkQoYgNqgF2egqlTgCfQDkVbdIo4B0QoINjaD+gjRTK
YM4AnjdM4gGmJYMnyAD/TwBsDhblBHBN
=6ufA
-END PGP SIGNATURE-


Re: Conversion to doc via pandoc

2012-04-17 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 16/04/12 22:42, Richard Heck wrote:
> On 04/16/2012 09:07 AM, Rainer M Krug wrote:
>> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1
>> 
>> Hi
>> 
>> I just discovered pandoc, and I use it to convert to odt format (and then in 
>> OpenOffice to 
>> doc).
>> 
>> The conversion goes LyX ->  LyXHTML ->  odt
>> 
>> I defined the following format:
>> 
>> \format "odt lo" "odt" "Libreoffice writer" "" "libreoffice" "libreoffice" 
>> "document,menu=export"
>> 
>> and the following converter:
>> 
>> \converter "xhtml" "odt lo" "pandoc -o $$o $$i" ""
>> 
> How much better is this than simply exporting LyXHTML and then opening the 
> resulting file in 
> LibreOffice?

Well - LibreOffice gives an error when trying to open the xhtml file, and I 
can't open it in my
browser either (seems to be corrupt for this document?). Another document, 
produces an empty
output when opening the xhml in LibreOffice.

> 
> There's no reason we couldn't add this as a converter. File a bug to remind 
> me if you like.
> 

I t'll add it top #6042 as Liviu pointed out.

Would be great if pandoc converter could be added, as it seems to be quite 
robust in handling even
corrupt xhtml files.

Cheers,

Rainer

> Richard
> 


- -- 
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:  rai...@krugs.de

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

iEYEARECAAYFAk+NFhoACgkQoYgNqgF2egqObQCcCsJmRnC8Udzc02mPbbZneODq
zGIAn0cbjUXODB9r4DXgLTkdLNndMGgf
=f0y3
-END PGP SIGNATURE-


Re: Conversion to doc via pandoc

2012-04-16 Thread Liviu Andronic
On Mon, Apr 16, 2012 at 10:42 PM, Richard Heck  wrote:
> There's no reason we couldn't add this as a converter. File a bug to remind
> me if you like.
>
I guess #6042 [1] serves for this purpose.

Liviu

[1] http://www.lyx.org/trac/ticket/6042


Re: Conversion to doc via pandoc

2012-04-16 Thread Richard Heck

On 04/16/2012 09:07 AM, Rainer M Krug wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

I just discovered pandoc, and I use it to convert to odt format (and then in 
OpenOffice to doc).

The conversion goes LyX ->  LyXHTML ->  odt

I defined the following format:

\format "odt lo" "odt" "Libreoffice writer" "" "libreoffice" "libreoffice" 
"document,menu=export"

and the following converter:

\converter "xhtml" "odt lo" "pandoc -o $$o $$i" ""

How much better is this than simply exporting LyXHTML and then opening 
the resulting file in LibreOffice?


There's no reason we couldn't add this as a converter. File a bug to 
remind me if you like.


Richard



Conversion to doc via pandoc

2012-04-16 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

I just discovered pandoc, and I use it to convert to odt format (and then in 
OpenOffice to doc).

The conversion goes LyX -> LyXHTML -> odt

I defined the following format:

\format "odt lo" "odt" "Libreoffice writer" "" "libreoffice" "libreoffice" 
"document,menu=export"

and the following converter:

\converter "xhtml" "odt lo" "pandoc -o $$o $$i" ""

The format is very nice to work with, and I had no luck with the normal mk4ht 
way, as it resulted
in a corrupt odt document, while the pandoc route worked nicely. OK - tables 
and pictures need to
be manually adjusted, but the text was exported very nicely.

I tried to go LyX -> LaTeX -> odt, but the result was not as useful.

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:  rai...@krugs.de

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

iEYEARECAAYFAk+MGasACgkQoYgNqgF2egpL9wCfbZfmBs3qdzFxvhYzFLt2ivab
IGoAnRjvjiBKr5sgyw2sCfTmLsU5H95i
=ttIF
-END PGP SIGNATURE-