On 02/27/2014 11:08 AM, stefano franchi wrote:
On Thu, Feb 27, 2014 at 9:18 AM, Richard Heck <rgh...@lyx.org> wrote:
On 02/27/2014 03:44 AM, Prannoy Pilligundla wrote:

I also had a look at pandoc and tex4ht but as they are converters from
Latex,i feel we should only consider them as secondary options.

I believe pandoc is pretty modular. One would only need to add LyX to the
list of formats that it handles and then, like magic, we could convert the
LyX format to anything else that pandoc handles. It seems to me that this
would be a very good approach.

The downside to any python-based approach, though, is that the LyX format is
a moving target. The script would need to be updated with every syntax
change.

An important point when deciding where to convert from (LyX|LateX, and
so on) is that there are information that are actually produced by the
LaTeX run(s) and are not present in LyX at all. And some of these are
pretty important:

1. Cross-references
2. Bibliography
3. Indexes
4. Table of Contents, of Figures, of Tables, etc.

I can see recovering (1) and perhaps (4) from LyX, but how are we
going to get the properly formatted bibliographical references from
the LyX file, when the information about them are not in LyX, but in
the bibtex/biblatex style files? And similarly for the indexing.

Now, strictly speaking, bibliographic and indexing information are not
in the Latex .tex file either. They are in the various auxiliary files
produced by the latex runs. So a proper conversion would have to
target .tex + .aux + . bcf + idx, etcetera.

Unless I am missing something about the way LyX represents information
internally, I just don't see how we can get around this problem.

Some of this stuff will have to be exported as comments that we can reparse on import. I believe that is already done with some math stuff in TeX export.

Richard

Reply via email to