# SnuggleTeX semantic input widget demo

This is basically the same as the ASCIIMath semantic input widget demo, but it uses LaTeX as an input format, which is processed using SnuggleTeX.

This demo is arguably not as successful as the ASCIIMath demo, as the SnuggleTeX parser is very strict so will complain about incomplete expressions, so can lead to a lot of negative feedback.

## Try it

Enter some LaTeX in the box below. Feedback will be shown while you type to the right of the input box. Some additional technical details will appear below that may be interesting to some people...

This input widget is configured to treat **f** and **g** as functions,
**e** as the exponential number, **i** as the imaginary number and
**γ** as Euler's constant.

## Technical implementation details

The LaTeX input syntax is sent to a simple AJAX web service that converts it to Presentation MathML using SnuggleTeX, and then applies the SnuggleTeX semantic enrichment process on it to see if it can be converted to Content MathML (and Maxima input syntax). It also converts it to a special "bracketed" version of Presentation MathML, which is shown next to the input box above, using MathJax for rendering so that it works in most modern browsers.

MathML experts may be interested in the live information below.

### Semantic Presentation MathML generated by SnuggleTeX

This shows the result of the first part of the SnuggleTeX semantic enrichment process, which restructures the raw Presentation MathML to emphasise the underlying semantics and make it more amenable for further processing.

### Bracketed Presentation MathML generated SnuggleTeX

This is the source of the MathML that is shown to the student, emphasising where inferred groupings and bracketings have been made.

### Resulting Content MathML source

This is the resulting Content MathML, created by the web service. Being able to generate this is criteria we use here for "making sense of the input".

### Resulting Maxima code

This is the resulting Maxima input syntax, created by the web service from the Content MathML. This will not always succeed as some supported Content MathML constructs can't be turned into Maxima equivalents.