On 12/24/07, Aditya Mahajan <adityam@umich.edu> wrote:
On Sat, 22 Dec 2007, Gour wrote:
> 5) I read LaTeX in proper ConTeXt pdf, but I'm interested is there some
> helper to convert classical LaTeX book (book class) to ConTeXt? I've two
> books which I'm considering to publish as one (~1000p) in the future, so
> any help in conversion would be nice.
I do this quite often (ConTeXt -> LaTeX), so I am just writing my thoughts
about this. A general purpose translator from ConTeXt to LaTeX is VERY
difficult, because of the nature of both macro languages. However, it is
relatively simple to convert a subset of one to the other. Currently, I
write most of my papers in ConTeXt. For the final version of the paper,
most journals want LaTeX. I know my style of writing ConTeXt, and can
easily convert 95% percent of it to LaTeX using regular expressions (and
have been thinking of exploring gema in more detail:
http://gema.sourceforge.net/). It is easier to do the rest by hand rather
than writing a script that takes care of all the corner cases. Usually it
takes me around 2 hours to convert a (30-40 page) paper from ConTeXt to
LaTeX. Since this needs to be done only once every six months or so, I
have not spent too much time trying to optimize my approach. I think that
the same will be true for conversion from LaTeX to ConTeXt. However, I
would suggest that you start by writing some ConTeXt documents by hand,
before you automate the conversion. This way, you will know what you want
to achieve from a conversion script.
This is consistent with my experience.
I suggest that anyone considering such conversions creating a simple test
document with one example of each construct you use. I took Lamport's
sample2e.tex, added a figure and a table, and then made a context version
which is part of my test suite for new tex installations.
--
George N. White III <aa056@chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia