Hi Prannoy,
I guess Stefano has probably already told you that, but for information
that is not correctly converted back from ODT to LyX, there are two
different cases:
(1) The data is "correct" in ODT (at least in a form that makes sense to
us) but does not get converted back in the right way.
As other said, this can be solved by fixing the converter, even though
it may be difficult in some cases.
(2) The data is not correct, or the mapping from LyX to ODT is not a
bijection. You mentioned the equation environment in another e-mail. If the
two different modes in LyX/LaTeX (inline and paragraph mode) get mapped to
one mode in ODT, then the best way to maintain the necessary information is
by having an extra "back-annotation", maybe as a comment or extra attribute
that is not visible in the ODT document.
I'm not sure if such a feature exists, but it would solve problems with
features that cannot be accurately represented in the ODT file.
Prannoy Pilligundla wrote:
Hi Everyone,
I am almost done with LyX to ODT part of my project and I started work on
the roundtrip i.e ODT to LyX part of the project. For LyX to ODT I
converted LyX to LaTeX first and then used tex4ht for converting LaTeX to
ODT. In case of math I am also storing the latex expression as it as in the
ODT file(using annotation property) as meta data.
Now for getting back to LyX from ODT I am thinking of writing a python
script which does this conversion. As of now I am planning to use the xml
parsers expat library <https://docs.python.org/2/library/pyexpat.html>.I
also had a look at lyx2lyx scripts. I tried using Writer2LaTeX but it
doesn't suit our purpose of getting back the same LyX file. I am not very
clear on how to go ahead from this juncture. For example I am not clear on
how I will get information about all the packages used from the ODT file. I
feel I am not aware of many issues which need to be taken care of during
this conversion process. It would be great to hear your comments and
suggestions on how to go ahead
Thanks and Regards
Prannoy Pilligundla
--
Regards,
Cyrille Artho - http://artho.com/
If you can, help others. If you can't, at least don't hurt others.
-- the Dalai Lama