ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: ConTeXt vs. LaTeX -> XML/MathML -> XHTML/SVG/PNG -> ePub
Date: Mon, 2 Aug 2010 13:20:58 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LNX.2.00.1008021301370.9610@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <AANLkTik40pP3mYu-ttmCYA-jUJs0KBhhuYoMhVOAQ83-@mail.gmail.com>

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

> On Mon, Aug 2, 2010 at 10:10 AM, Grant W. Petty <grantwp3@gmail.com> 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
___________________________________________________________________________________


      reply	other threads:[~2010-08-02 17:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-02 16:30 Grant W. Petty
2010-08-02 17:20 ` Aditya Mahajan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LNX.2.00.1008021301370.9610@ybpnyubfg.ybpnyqbznva \
    --to=adityam@umich.edu \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).