axiom-developer
[Top][All Lists]

## Re: [Axiom-developer] Semantic Latex

 From: James Davenport Subject: Re: [Axiom-developer] Semantic Latex Date: Sun, 14 Aug 2016 18:05:32 +0000

Indeed, the semantics of LaTeX is pretty weak. I REALLY wouldn't like to start
from there - even (good) MathML-P, with &InvisibleTimes; etc. is much better.
However, LaTeX is what we have, and what we are likely to have in the near
future, so we must live with it, and yours seems like as good an accommodation
as any.
Another problem is that mathematicians do not mean what they write:
$\frac{x+1}2$ is logically an element of Z(x), but the mathematician probably
intended Q[x].
James

Sent from my iPhone

> On 10 Aug 2016, at 11:50, "Tim Daly" <address@hidden> wrote:
>
> There has been an effort in the past to extract mathematics from
> latex. It seems that the usual latex markup does not carry enough
> semantic information to disambiguate expressions.
>
> Axiom has a similar problem occasionally where the interpreter
> tries to guess and the compiler insists on type specifications.
>
> Axiom provides an abbreviation for each type, such as FRAC for
> Fraction and INT for Integer.
>
> Might it be possible to create latex macros that take advantage
> of this to provide unambiguous markup. For instance, instead of
>
> \frac{3x+b}{2x}
>
> we might have a latex markup of
>
> \FRAC[\INT]{3x+b}{2x}
>
> where there was a latex macro for each Axiom type. This would
> turn into an latex \usepackage{AxiomType}
>
> There would be a map from the \FRAC[\INT] form to the \frac
> form which seems reasonably easy to do in latex. There would
> be a parser that maps \FRAC[\INT] to the Axiom input syntax.
>
> The problem would be to take the NIST Math Handbook sources
> (is the latex available?) and decorate them with additional markup
> so they could parse to valid Axiom input and valid latex input
> (which they already are, but would validate the mapping back to
> latex).
>