Discussion:
[Axiom-developer] website <-> latex
Page, Bill
2004-06-01 16:47:51 UTC
Permalink
Tim,

You wrote:

"HTML is a dead end, write-only format."

Well, I know where you are coming from, but I seriously doubt
that you will be able to convince the current generation of
web users of that! The move is still very strongly away from
traditional LaTeX and towards XML-based extensions of HTML
such as MATHML.

In the current LatexWiki that is implemented at

http://page.axiom-developer.org/zope/Plone/wiki

when you Edit the contents of a page, you have option of
specifying alternate input languages for the page:

Structured Text + LaTeX
HTML + LaTeX
Structured Text
reStructured Text
HTML
Plain text

The thing that is closest to pure LaTeX coding is the first
one: Structured Text + LaTeX. In that case you can have simply
formatted text, e.g. paragraphs and embedded LaTeX coding
(usually only for equations). Structured Text also allows you
to specify list structures, heading etc. but the format is
not the same as in usual LaTeX coding.

I find the HTML + LaTeX option a rather strange mix, however
it is powerful and flexible that the first one.

One enhancement of LatexWiki that I would like to see is a
"pure" LaTeX mode which would parse LaTeX constructions such
as \itemize and some of the other common LaTeX text formatting
codes into the equivalent HTML code rather than rendering it
as a graphic generated from LaTeX output. And this might also
be extended to handle MATHML coding (if desired). We have
had some discussions here about software that can do reliable
LaTeX to HTML/MATHML and I think this could be quite easily
encorporated in LatexWiki. At the present time, it should be
possible to process LaTeX to HTML/MATHML using an external
program and then use the simple HMTL option to upload it to
a wiki page. But if your generated HTML code needs associated
graphics, these will have to be uploaded separately.

I know that Bob McElrath is working on the idea of extending
LatexWiki here:

http://mcelrath.org/Notes/LatexWiki#msg20040531222012-***@mcelrath.org

----

Today I have updated the software on the Axiom Portal so that it
is now possible to subscribe to Discussions (forum topics) as
well as to Wiki pages. For example see the :> Subscribe menu
option at

http://page.axiom-developer.org/zope/Plone/forum/public

In the case of subscription to a Wiki page, any new pages or
comments on these pages are immediately sent to all subscribers.
But in the case of the Discussion (forum) subscriptions, a
digest of new topics and replys is sent only once per week.

Please let me know if you have any trouble using these
features.
-----Original Message-----
Sent: Tuesday, June 01, 2004 10:22 AM
Subject: learning in public
More interesting to me would be a way to unify the
website <-> latex. I can create a website with latex2html
which is how I usually do these things. I'd like to have
the information in latex format because I can do so many
more things with it. HTML is a dead end, write-only format.
Tim
Bob McElrath
2004-06-01 17:50:38 UTC
Permalink
Post by Page, Bill
One enhancement of LatexWiki that I would like to see is a
"pure" LaTeX mode which would parse LaTeX constructions such
as \itemize and some of the other common LaTeX text formatting
codes into the equivalent HTML code rather than rendering it
as a graphic generated from LaTeX output. And this might also
be extended to handle MATHML coding (if desired). We have
had some discussions here about software that can do reliable
LaTeX to HTML/MATHML and I think this could be quite easily
encorporated in LatexWiki. At the present time, it should be
possible to process LaTeX to HTML/MATHML using an external
program and then use the simple HMTL option to upload it to
a wiki page. But if your generated HTML code needs associated
graphics, these will have to be uploaded separately.
Well the original idea was just to add the minimal required to enable
people to easily write equations. I didn't really intend for a full
latex environment. tex4ht can convert latex documents to html/mathml,
but it is very slow. (slower than regular latex) You will notice that
the current latexwiki can do mathml via a program called itex2MML if you
uncomment the type at the bottom of __init__.py. This program uses lex
and yacc to parse a subset of the latex math syntax. Do not feed it
anything too complicated.

FULL latex compatibility will require involving the latex program, which
I would like to move away from because it's slow. But I'm open to
adding more latex elements to latexwiki.

Note that the whole thing is open source, written in python, so I
encourage you all to implement any of the above that you're interested
in. ;)

The problem with mathml is that the client side is a disaster. (fonts)
So for the forseeable future I will implement it as a option that
individutal users have to go turn on.

Cheers,
Bob McElrath [Univ. of California at Davis, Department of Physics]

"A great many people think they are thinking when they are merely
rearranging their prejudices." -- William James
M***@univ-orleans.fr
2004-06-02 10:26:48 UTC
Permalink
Hello Bill,
Post by Page, Bill
Well, I know where you are coming from, but I seriously doubt
that you will be able to convince the current generation of
web users of that!
I think it would be more adapted to consider only the current generation o=
f
scientists, rather than web users (most won't care about Axiom, I suppose?=
).
And I can assure you, from my experience and the experience of colleagues,=
that
it is very easy to have students in science learn TeX in a few days, and w=
rite
their reports in TeX. Not more easy, not less easy to learn than any other=

computer language like Fortran or C, and certainly much simpler to learn t=
han
Quantum Field Theory or C* algebras :-)
Post by Page, Bill
The move is still very strongly away from
traditional LaTeX and towards XML-based extensions of HTML
such as MATHML.
Well, XML is driven by the Microsoft mammouth and a few others, and I agre=
e
that, in theory, it would be very attractive to merge portions of XML docu=
ments
generated by Word with portions of documents generated by other software s=
uch
as LaTeX, Amaya, Lyx, TeXmacs, etc.

However, in practice, my experience with the much simpler example of just
trying to import, into Word, HTML documents issued from other software, is=
that
one usually obtains error messages saying approximately "The document you =
are
trying to import contains errors, correct them and try later" ; even if it=
is a
perfectly correct html document, that you displayed with Internet Explorer=
or
Mozilla a few minutes before, so that it's clear the bugs come from Word, =
not
from the html document.

As for importing / exporting XML documents to exchange documents between
various software, it seems to me reasonable to fear that bugged software (=
such
as Word, but not only) can create bugged XML documents, and thus bugged
formulas, so that for ex. a formula that is correctly displayed with Word
version N could be displayed incorrectly with another version of Word, or =
some
other editor or display software (Amaya or other). So, my reaction to your=

remark "The move is still very strongly away from traditional LaTeX and to=
wards
XML-based extensions" would be that, if your remark is true, then it is a =
very
strong argument to completely avoid XML, if one wants to privilege rigor i=
n
math documents and in Axiom :-) Just look at Basic and what it became in =
the
hands of Microsoft : I have a personal theorem that asserts that any progr=
am
written in MS Basic (i.e. using MS extensions) is bound to fail with any
succeeding version of MS Basic one or two years later...

Furthermore, I still don't see the advantages, for mathematicians, of
Mathml/Xml over TeX, it seems to me nothing else than a (still) unachieved=
and
very verbose way of trying to do the same, with the considerable disadvant=
age
IMHO of making math formulas completely unreadable by humans, so that we a=
re
forced to read them through software, which are inevitably buggy, and so m=
ight
represent incorrectly the formulae etc etc. (goto previous paragraph !). T=
eX
has been created by a mathematician for mathematicians, and a TeX formula =
is
very similar to the way one would read a formula to a colleague by telepho=
ne
(cf. "history of TeX" on TUG site), so it's easy for a human to read it fr=
om
its TeX source, not from its mathml source : one line of TeX is roughly on=
e
page of Mathml.

The experience of TechExplorer is IMHO a good example of what can happen w=
hen
trying to follow fashion driven by commercial products and stick to them :=
it
could display directly some LaTeX documents into the first versions of Int=
ernet
Explorer, but it ultimately failed, in part (if I understood well) because=
of
modifications from Internet Explorer 5 to 6. Just replace LaTeX with Mathm=
l,
and imagine what could happen.

To summarize, I think that, for Open Source mathematical software, we oug=
ht to
privilege rigorous developments, rather than vigorous developments. I vote=
for
Tim's approach, considering TeX documents as source, and html as dead-end,=

write-only format ; and I propose to consider Xml and Mathml on the same
footing as html, because Xml/Mathml documents can be created from TeX sour=
ce by
TeX4ht, and because this prevents Axiom from becoming dependent of future
evolution of Xml/Mathml and commercial software, so that it continues to b=
e
built on a zero-bug, rock-solid basis.

Best wishes,
Michel
La recherche est en danger!!
Sauvons la!
signez et faites signer les p=E9titions sur
http://recherche-en-danger.apinc.org/
Bob McElrath
2004-06-02 16:14:50 UTC
Permalink
Post by Page, Bill
The move is still very strongly away from
traditional LaTeX and towards XML-based extensions of HTML
such as MATHML.
MathML is not writable or readable by humans. Therefore it will always
be an intermediate format, and *only* an intermediate format. One must
use other tools to create it. The appropriate tool for the forseeable
future is LaTeX.

--
Cheers,
Bob McElrath [Univ. of California at Davis, Department of Physics]

"A great many people think they are thinking when they are merely
rearranging their prejudices." -- William James
Bill Page
2004-06-02 17:41:48 UTC
Permalink
On Wednesday, June 02, 2004 6:27 AM
Post by M***@univ-orleans.fr
Post by Page, Bill
Well, I know where you are coming from, but I seriously
doubt that you will be able to convince the current
generation of web users of that!
I think it would be more adapted to consider only the current
generation of scientists, rather than web users (most won't
care about Axiom, I suppose?). And I can assure you, from my
experience and the experience of colleagues, that it is very
easy to have students in science learn TeX in a few days, and
write their reports in TeX. Not more easy, not less easy to
learn than any other computer language like Fortran or C, and
certainly much simpler to learn than Quantum Field Theory or
C* algebras :-)
Yes I agree with you. But I work for a large scientific
research organization (about 200 research scientists, some in
engineering, math and physics, others in "softer sciences").
Recently I have had to deal specifically and almost everyday
with the issue of LaTeX versus WORD. Perhaps 50% of our authors
are still "die-hard" LaTeX users who would also share your
views. The other 50% (and probably increasing) now use WORD -
in spite of all of the problems that it causes. In fact, the
use of WORD is a de facto organization standard as set by
corporate office users who know very little about preparing
scientific documents and for the most part do not even use
WORD very well. I don't think this trend is unique to our
organization.

Still, I promote and defend LaTeX when ever I can. When
I can't do that, I promote OpenOffice. But you might be
quite surprised how hard it is to "sell" something that
is free, even when it is clearly better.
Post by M***@univ-orleans.fr
Post by Page, Bill
The move is still very strongly away from traditional
LaTeX and towards XML-based extensions of HTML such as
MATHML.
Well, XML is driven by the Microsoft mammoth and a few
others, and I agree that, in theory, it would be very
attractive to merge portions of XML documents generated
by Word with portions of documents generated by other
software such as LaTeX, Amaya, Lyx, TeXmacs, etc.
XML is a W3C standard. What Microsoft does with it is,
in my opinion, largely irrelevant. The XML format used
by WORD is not very useful - still it is somewhat better
than an undisclosed completely proprietary format. I think
OpenOffice generates much better XML.

But really it is incorrect to refer to "XML documents". XML
is not a document format. It is a semantic neutral generic
mark-up language. It is the namespace and other semantics that
one must add to XML in any given application that determine
the actual "document" content.
Post by M***@univ-orleans.fr
However, in practice, my experience with the much simpler
example of just trying to import, into Word, HTML documents
issued from other software, is that one usually obtains error
messages saying approximately "The document you are trying
to import contains errors, correct them and try later";
even if it is a perfectly correct html document, that you
displayed with Internet Explorer or Mozilla a few minutes
before,
Just because an HTML document displays properly in some
browser (Explorer, Mozilla or any other, any given version,
etc.) does not mean that it is "correct" HTML. For that
you need an HTML validator program (see W3C website). But
trying to creating or importing HTML to/from WORD is not
something I would ever try to do except perhaps as a last
resort. HTML is a "presentation" format. WORD wants an
editable format as input. WORD creates rather poor and
idiosyncratic HTML as output. (OpenOffice creates much
better HTML.) You would have similar (or worse) problems
trying to import postscript or PDF format into WORD (or
other word processor).
Post by M***@univ-orleans.fr
so that it's clear the bugs come from Word, not from the
html document.
WORD certainly has bugs, but I don't see how you can
conclude this from what you apparently are asking it
to do.
Post by M***@univ-orleans.fr
As for importing / exporting XML documents to exchange
documents between various software, it seems to me
reasonable to fear that bugged software (such as Word,
but not only) can create bugged XML documents, and thus
bugged formulas, so that for ex. a formula that is correctly
displayed with Word version N could be displayed incorrectly
with another version of Word, or some other editor or
display software (Amaya or other).
Yes, I agree. There are many examples of this. But it has
nothing to do with XML as such.
Post by M***@univ-orleans.fr
So, my reaction to your remark "The move is still very
strongly away from traditional LaTeX and towards
XML-based extensions" would be that, if your remark is true,
then it is a very strong argument to completely avoid XML,
if one wants to privilege rigor in math documents and in
Axiom :-)
I don't see what this has to do with XML?
Post by M***@univ-orleans.fr
Just look at Basic and what it became in the hands of
Microsoft : I have a personal theorem that asserts
that any program written in MS Basic (i.e. using MS
extensions) is bound to fail with any succeeding version
of MS Basic one or two years later...
You are right. However I have a similar experience with
Java, Perl, Maple, and even Axiom. So I think that you
are simply protesting too much about Microsoft. Forget
about Microsoft as such, and support free and open source
software.
Post by M***@univ-orleans.fr
Furthermore, I still don't see the advantages, for
mathematicians, of Mathml/Xml over TeX, it seems to me
nothing else than a (still) unachieved and very verbose
way of trying to do the same, with the considerable
disadvantage IMHO of making math formulas completely
unreadable by humans, so that we are forced to read them
through software, which are inevitably buggy, and so might
represent incorrectly the formulae etc etc. (goto previous
paragraph !).
I agree with what you say about the readability of MATHML
but it is not correct to think of it as "trying to do the
Post by M***@univ-orleans.fr
MathML is not writable or readable by humans. Therefore
it will always be an intermediate format, and *only* an
intermediate format. One must use other tools to create it.
The appropriate tool for the foreseeable future is LaTeX.
I agree with this and am not trying to argue against it.
LaTeX is still a very reasonable way to create typeset
quality mathematics. But the goals of MATHML are quite
different. It is a standard language which a web browser
is expected to be able to parse and render just like it
renders other HTML and even vector graphics formats etc.
Yes, it could have been LaTeX instead of an XML-based
standard, in fact LaTeX even had most (all?) of the
formatting and hypertext extensions available when HTML
was invented for the Web. But as it turns out, standards
are one thing and "best practices" are another. Most people
think that the web and HTML succeeded where earlier tools
like LaTeX and SGML failed simply because of the sudden
acceptance of this coding as a "standard". Usually it is
just a matter of timing and politics.

Perhaps it is a mistake to think that W3C and related
international organizations can repeat this with more
complex text like mathematics.
Post by M***@univ-orleans.fr
TeX has been created by a mathematician for mathematicians,
and a TeX formula is very similar to the way one would read
a formula to a colleague by telephone (cf. "history of TeX"
on TUG site), so it's easy for a human to read it from
its TeX source, not from its mathml source : one line of TeX
is roughly one page of Mathml.
I really don't see much advantage of reading formula by
telephone ... although I admit that I often use a simplified
LaTeX coding in emails to colleagues.

But the point is that it takes a computer with a LaTeX
package installed to properly render mathematics from LaTeX
and it takes a MATHML capable browser to render MATHML. If or
when people have MATHML capable browsers open and ready on
their desk tops, they might expect to display mathematical
text without any additional programs. Right now we do that
by resorting to a much less efficient graphic format such
as png, gif or jpeg (which of course none are in any kind
of "human" readable format).
Post by M***@univ-orleans.fr
The experience of TechExplorer is IMHO a good example of
what can happen when trying to follow fashion driven by
commercial products and stick to them : it could display
directly some LaTeX documents into the first versions of
Internet Explorer, but it ultimately failed, in part (if
I understood well) because of modifications from Internet
Explorer 5 to 6. Just replace LaTeX with Mathml, and imagine
what could happen.
That is already happening. I think TechExplorer is still
a commercial product of IBM, right?
Post by M***@univ-orleans.fr
To summarize, I think that, for Open Source mathematical
software, we ought to privilege rigorous developments,
rather than vigorous developments. I vote for Tim's approach,
considering TeX documents as source, and html as dead-end,
write-only format ; and I propose to consider Xml and Mathml
on the same footing as html, because Xml/Mathml documents
can be created from TeX source by TeX4ht, and because this
prevents Axiom from becoming dependent of future evolution
of Xml/Mathml and commercial software, so that it continues
to be built on a zero-bug, rock-solid basis.
I also agree with you, Tim and Bob about the choice of
LaTeX (or more specifically Tim's noweb extensions of it)
as a practical source format. However I do not agree with
your opinions about XML or that HTML and MATHML are
"dead-ends". To me they are simply "a means to an end".
Post by M***@univ-orleans.fr
Best wishes,
Michel
Thank you very much for your comments.

Regards,
Bill Page.
Bill Page
2004-06-03 13:18:37 UTC
Permalink
I do not agree [that] XML or HTML and MATHML are "dead-ends".
To me they are simply "a means to an end".
Sorry, I did not explain clearly. No, I did not say they
_are_ dead ends, I just suggested to _consider them_ as
dead-ends, as long as there is no tool that translates from
mathml to latex.
Actually MATHML to LaTeX is not very difficult. Here are
some references:
Bill Page
2004-06-03 13:34:34 UTC
Permalink
Continue reading on narkive:
Loading...