[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] pamphlet support on MathAction

From: Bob McElrath
Subject: Re: [Axiom-developer] pamphlet support on MathAction
Date: Tue, 12 Oct 2004 10:21:44 -0700
User-agent: Mutt/1.5.6+20040523i

Bill Page address@hidden wrote:
> Martin,
> I am sorry that I do not have anything integrated with
> MathAction yet. I ran into a few problems with my modifications
> of the l2h (latex to html) noweave -filter and am still
> making changes to fix this before adding it to LatexWiki.
> In some cases the internal HTML linkages created by
> noweave mess up the selected pass thru of the Latex
> coding like \begin{equation} and \begin{axiom} because
> noweave assume that the output of the l2h filter will be
> *pure* html with nothing "strange" embedded like LaTeX
> coding. The LatexWiki html+latex document type is a
> little strange in that it permits (expects?) the LaTeX
> coding just to be inserted in the HTML even though the
> the syntax of these two languages is not really compatible.

I have been rewriting the StructuredText document type in the last week
or so, and have decided that html+latex must go away because these two
languages are not compatible.  Specifically, latex can contain less-than
and greater-than symbols, and it is not possible to disentangle latex
from html tags.

I have decided on the following "new" pagetypes:
    o stx + latex -- cannot contain html, latex is "higher-priority" so
    that e.g. [$a$] is a wiki link with an equation and $[a]$ is an
    equation with brackets in it (and not a wikilink).  There will also
    be a backend which renders mini-latex (below) to generate printable
    (ps/pdf) output.

    o mini-latex -- just enough latex markup to get stx functionality,
    and will render if passed to latex, but will actually be processed
    by the StructuredText machinery as a new pagetype.  i.e. it will
    know \begin{itemize}, \item, \cite, \tt, \bf, \it, etc and not
    require a preamble.

    o latex -- true latex, will be passed to latex2html or tth for the
    web, pdflatex for printable output.

It is only possible to mix html and latex if we require that latex
escape the characters <>&.  This seems very difficult, especially for
hand-coded latex, but maybe your generator can do it?  I am debating
whether stx+latex needs a true escaping mechanism.  I think we can only
retain html+latex if we require the embedded latex to be escaped

The hyperref and 
packages allow one to embed HTML in latex but require latex-style tags
like \htmladdimg.  (see also tex4ht)

My latest work is here::

right now it duplicates the ZWiki functionality.  (These classes will be
added to ZWiki and replace  I have not added latex yet.  I hope
by looking at and it is obvious what to do.

I have much work to do here before getting to latexwiki -- like
integrating the WikiLink mechanism and merging with ZWiki.

> There are also related problems about how l2h likes to
> convert \ref{} to equation \label{} versus the way that
> LatexWiki is doing it now. LatexWiki insists on renumbering
> equations and that is not compatible with the links that
> were earlier inserted by l2h. Plus the insertion of html
> anchors for the equations is messed up by the way that
> I coded the pass thru of LaTeX coding.

I want to use \ref and \label instead.  Hopefully this will make it in
the next release.  But if you beat me to making a patch for this, please
send it along!

> I think what I need to do is have the l2h filter wrap the
> LaTeX in a special "html-like" tag e.g.
>   <latex>
>   \begin{equation}
>   ...
>   \end{equation}
>   Some paragraph
>   \begin{axiom}
>   ...
>   \end{axiom}
>   </latex>
> Then (hopefully) the rest of the noweave indexing mechanism
> wont insist on inserting html inside these html tags.

Even this is treacherous.  A mark of a good markup system is that it has
the proper escaping to write a document about itself.  It is obtuse, but
can you place the string "</latex>" inside a latex block?  It looks like
hypextra does what you propose, but it is incapable of placing </latex>
inside a latex block.

If we can think of nothing better, I would accept enclosing
latex-in-html with <latex> tags.  However I think a better idea would be
<equation> and <axiom> tags.

> Anyway, I will be away at a meeting (and short vacation)
> for the next 10 days so don't expect much progress until
> later this month.

Okay.  ;)  Well, let's see how much I've gotten done when you get back.

P.S. this message will hose ZWiki and LatexWiki because it contains
mock-tags.  I propose also that mail-in messages be stx *without* html.
This is required anyway if we mark-up message quoting with '>'.  i.e. if
the mime-type of the message is text/plain we treat it as text/stx
(since no mailer will generate text/stx).  Alternatively if the email
contains mime multipart/alternative with an HTML section, we can use
that directly.  This points toward comments being independent documents
of the parent -- and each comment could have a different pagetype!

Bob McElrath [Univ. of California at Davis, Department of Physics]
    It is unpatriotic to question the Kleptocracy.

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]