Re: [NTG-context] ConTeXt vs. LaTeX -> XML/MathML -> XHTML/SVG/PNG -> ePub

2010-08-02 Thread Aditya Mahajan

On Mon, 2 Aug 2010, Grant W. Petty wrote:


On Mon, Aug 2, 2010 at 10:10 AM, Grant W. Petty  wrote:

I am trying out ConTeXt for the very first time, hoping to assess
whether it's worth re-tooling from LaTeX for authoring scientific
textbooks.



To elaborate on this comment which I made in another thread, I have
written and self-published two university-level atmospheric science
textbooks in LaTeX which are doing quite well by the standards of my
small field.   I am now also contracting to publish textbooks for
other authors.

I am very interested in eventually reformatting my own existing books,
as well as future books, as documents that can be both printed as
professional-quality bound textbooks as well as distributed as e-books
-- for example  ePub format and/or XHTML.   The principle technical
hurdle seems to be posed by the heavy use of mathematical equations.
I want the math in the electronic versions to be very clean and
scalable (e.g., SVG; eventually MathML as e-readers do a better job of
supporting it).




While there are programs like TeX4HT and LaTeXML that convert LaTeX
source to XML/MathML, they seem to have trouble with unfamiliar
packages and macros, and the math rendering seems quite imperfect as
well (though I can't yet tell whether that's a problem with the
conversion to MathML or rather with current e-readers imperfect
support for MathML).


I think that it is better to test mathml on a recent web browser rather 
than ereaders.



My question is whether anyone has insight into the relative strengths
of LaTeX vs. ConTeXt as an authoring environment in the specific case
that the author wants high-quality multi-format outputs for  print and
electronic distribution.  An example workflow I could imagine would be

ConTeXT or LaTeX source   ->   XML/MathML  (DocBook?)  ->  PDF or
XHTML with math encoded as MathML and/or SVG and/or PNG -> ePub with
high-quality math readable on various commercial readers

I'm quite new to this subject matter, having only begun to learn about
e-publishing formats a couple of weeks ago, so I'll welcome any
advice, however basic.


Context/latex to xml will never work unless you are willing to restrict 
yourself to a subset of supported input syntax. If you are willing to do 
that, then a cleaner alternative to is to *input* all your 
text as XML. For plain text XML is not too verbose, but MathML is a pain 
to type by hand. There are various libraries that convert tex math markup 
to mathml that may ease the task.


If the math is not too complicated, one option is to use asciimath. 
ConTeXt has some basic support for asciimath, and I believe that it is 
possible to convert asciimath to mathml.


Another option is to explore Microsoft's linear math format. It has a 
well defined grammer, so in principle it will be much easier to convert it 
to latex/context/mathml input.


The big advantage of using such a setup is that you can use the same 
source to display the document on web (or epub, which is essentially 
zipped xml files) and to generate pdf (context handles xml input very 
well). One less toolchain to debug.



It's my impression, by the way, that ConTeXT does not directly support
AMSMath, which might mean having to not only rewrite a lot of existing
source but also to re-learn how to write math.


You can start by looking at 
http://dl.contextgarden.net/myway/context-latex-math.pdf


Aditya
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] ConTeXt vs. LaTeX -> XML/MathML -> XHTML/SVG/PNG -> ePub

2010-08-02 Thread Grant W. Petty
On Mon, Aug 2, 2010 at 10:10 AM, Grant W. Petty  wrote:
> I am trying out ConTeXt for the very first time, hoping to assess
> whether it's worth re-tooling from LaTeX for authoring scientific
> textbooks.
>

To elaborate on this comment which I made in another thread, I have
written and self-published two university-level atmospheric science
textbooks in LaTeX which are doing quite well by the standards of my
small field.   I am now also contracting to publish textbooks for
other authors.

I am very interested in eventually reformatting my own existing books,
as well as future books, as documents that can be both printed as
professional-quality bound textbooks as well as distributed as e-books
-- for example  ePub format and/or XHTML.   The principle technical
hurdle seems to be posed by the heavy use of mathematical equations.
I want the math in the electronic versions to be very clean and
scalable (e.g., SVG; eventually MathML as e-readers do a better job of
supporting it).

While there are programs like TeX4HT and LaTeXML that convert LaTeX
source to XML/MathML, they seem to have trouble with unfamiliar
packages and macros, and the math rendering seems quite imperfect as
well (though I can't yet tell whether that's a problem with the
conversion to MathML or rather with current e-readers imperfect
support for MathML).

My question is whether anyone has insight into the relative strengths
of LaTeX vs. ConTeXt as an authoring environment in the specific case
that the author wants high-quality multi-format outputs for  print and
electronic distribution.  An example workflow I could imagine would be

ConTeXT or LaTeX source   ->   XML/MathML  (DocBook?)  ->  PDF or
XHTML with math encoded as MathML and/or SVG and/or PNG -> ePub with
high-quality math readable on various commercial readers

I'm quite new to this subject matter, having only begun to learn about
e-publishing formats a couple of weeks ago, so I'll welcome any
advice, however basic.

It's my impression, by the way, that ConTeXT does not directly support
AMSMath, which might mean having to not only rewrite a lot of existing
source but also to re-learn how to write math.

Thanks,
Grant
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] ConTeXt vs. LaTeX

2004-08-04 Thread Zeljko Vrba
On Wed, Aug 04, 2004 at 11:09:01PM +0200, Siep Kroonenberg wrote:
> 
> The right way to handle this would have been to copy just the
> relevant code fragment to a package or classfile of your own and
> modify it. The code would have looked a lot hackier than
> corresponding Context code, but as long as it sits neatly tucked
> away in a package of its own, you wouldn't have to let that bother
> you.
> 
Ah, but I have only simplest experience in TeX programming (simple,
non-recursive \defs and \lets are my greatest achievment) and what you
are suggesting is still out of my reach..

1. I know very little of plain TeX and LaTeX internals to be able to do
   anything significant programming for latex.
2. I don't like asking for help. Partly because I don't want to bother
   people, partly because I'm impatient waiting for an answer. When I ask
   for help, I'm really desperate.

Context has enabled me to do typesetting the way I want without too much
'expert' advice and customization.. I had a few questions on Context a
few years ago when reference manuals were non-existant.. But now I'm able
to do everything I want on my own. Still with virtually no 'real' TeX
programming.

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] ConTeXt vs. LaTeX

2004-08-04 Thread Siep Kroonenberg
On Wed, Aug 04, 2004 at 06:58:48PM +0200, Zeljko Vrba wrote:
> On Wed, Aug 04, 2004 at 04:07:43PM +0200, Mojca Miklavec wrote:
> > 
> > I'm not sure if these are only the problems at the beginning (since I
> > have to look for almost any command I use) and would soon disappear or
> > would the general advice be "don't use ConTeXt if LaTeX suits your
> > needs". What are your opinions about that?

Try it for a bit and see whether you like it. Some people find that
it makes things simpler and more logical. It is a different way of
working, which may or may not suit you.

For me personally, somehow Context is a bad match, and it has been
fighting all the way. Therefore I use Context only when I have to.

> I learned Context because Latex didn't suit my
> needs (concrete example: for my diploma work, my mentor required that there
> must not be "Chapter" heading for each chapter.. If I put \chapter*, then
> it didn't appear in the table of contents.. the solution was dirty - copy
> the report class file to local directory and edit it.. however if such a simple
> problem has such a dirty solution, how could I cope with tougher problems?

The right way to handle this would have been to copy just the
relevant code fragment to a package or classfile of your own and
modify it. The code would have looked a lot hackier than
corresponding Context code, but as long as it sits neatly tucked
away in a package of its own, you wouldn't have to let that bother
you.

LaTeX source code is generally well-documented, and much easier to
find your way around in than Context code.

For presentations there are pdfscreen and pdfslide, and David Storey
has done nteractivestuff with pdf. So don't underestimate the
possibilities of LaTeX.

-- 
Siep Kroonenberg
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] ConTeXt vs. LaTeX

2004-08-04 Thread Zeljko Vrba
On Wed, Aug 04, 2004 at 04:07:43PM +0200, Mojca Miklavec wrote:
> 
> I'm not sure if these are only the problems at the beginning (since I
> have to look for almost any command I use) and would soon disappear or
> would the general advice be "don't use ConTeXt if LaTeX suits your
> needs". What are your opinions about that?
> 
Being a Context user, I also miss some of nice default formatting of LaTeX.
However, the need for some specific formatting which is weakly handled in
LaTeX made me use Context and I never regret it.

For example, automatic layout of text floating around figures. Or the
possibility of typesetting text in columns (see my document prepared in
Context at

http://oss.unist.hr/~zvrba/spa.zip

there I typeset text next to C code..)

The best thing I find about Context is that everything I ever thought
of (e.g. in one document I rotated the table 90 degrees to be parallel
with long side of A4 paper and text flowed around the table) is nicely
integrated in Context and there is no need for extra packages like in
Latex. Some things are undocumented in 'official' manuals (e.g. \hyphenatedurl)
but I found them easily by grepping through the code..

I settled myself on a style that fits the kind of documents I write and I
reuse it from a single environment..

Sure I miss nice formatting of Latex (I find my own design rather spartane)
and some packages (e.g. for typesetting the code, like vgrind) but the
consistency and easiness of doing typesetting the Context-way (defining
your own enumerations, 'theorems', headers/footers, placing figures and
tables within text, page layout, etc..) outweighs those drawbacks..

My advice (though, it may not be very popular here) is to stick to Latex
while it suits your needs. And this advice I would give for any kind of
tool - why change it if it isn't broken?

I learned Context because Latex didn't suit my
needs (concrete example: for my diploma work, my mentor required that there
must not be "Chapter" heading for each chapter.. If I put \chapter*, then
it didn't appear in the table of contents.. the solution was dirty - copy
the report class file to local directory and edit it.. however if such a simple
problem has such a dirty solution, how could I cope with tougher problems?
So I switched to Context and never use Latex any more..)

I must say that the beginners manual is excellent and is almost everything
you need.. For harder stuff, Hans and other TeX hackers on this list have
been an invaluable (and quick - I was in a real hurry writing my diploma)
help - THANKS GUYS!

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] ConTeXt vs. LaTeX

2004-08-04 Thread Mojca Miklavec
At the very first moment I saw some manuals I was highly impressed of
what ConTeXt was able to do and decided to switch from LaTeX to the new
typesetting system. I've put (probably to much) effort to typeset my
first presentation and a couple of other documents in ConTeXt after
which I realised that it takes me far less time if I continue using
LaTeX for some documents (no need to redefine styles for headings,
simple tables easier to typeset there, ...).
I'm not sure if these are only the problems at the beginning (since I
have to look for almost any command I use) and would soon disappear or
would the general advice be "don't use ConTeXt if LaTeX suits your
needs". What are your opinions about that?
I guess I could be missing something. \usemodule[pre-'something'] could
be a quick solution for presentations (and I needed quite some time to
realise that, but I've made up my own style anyway) - does anything 
similar exist also for "LaTeX-like" documents? I can write something for 
myself, but it still doesn't solve the problem if I want to convince 
someone to start using ConTeXt as a substitute for simple LaTeX 
documents as long he's unable to achive nice default formatting in one 
or two lines.

Thanks a lot,
Mojca Miklavec
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context