[LON-CAPA-users] tex in loncapa

Guy Albertelli II lon-capa-users@mail.lon-capa.org
Wed, 6 Jun 2007 12:40:24 -0400 (EDT)

Hi Peter,

> every now and then I experience that latex commands do not come out as I 
> expect (we use convert to images as a default here).

Well we haven't written the tex coversion engines that are in
lon-capa, we've just used some existing ones with the occaisional
tweak to make things work better. We've also limited ourselves to fast
engines, We didn't want the <m> conversion to be a performance killer
if it at all possible. That said we've ended up with 3 engines with
various features/bugs to them.

the tth engine is generally the most complete in it's support of
latex, almost anything works correctly but the output isn't always the
prettiest (looks like \"u is fine but \mapsto uses the \to arrow)

jsmath makes the prettiest output, but only really supports math and
does require js (looks like it gets \mapto correct but not \"u)

mimetex (the image one) will work on any browser no matter the setup,
but looks poor and only supports a math subset. (It gets neither the
\"u nor the \mapsto correct)

So they all have tradeoffs... I suspect that you might prefer
something like latexrender does, which is to have latex parse and
generate the dvi, and then convert the dvi to a web graphic. Which has
serious speed issues and thus isn't included as option.

> Sometimes we can use the HTML typesetting &uuml; as a workaround, but 
> occasionally it is absolutely necessary to have the Umlaut within tex, as in

I'd suggest switching renders for just this one then, you can do this
by telling <m> that you know that this one only work in a specfic
engine and to override the users preference

<m display="tth">...</m>

guy@albertelli.com   0-7-0-9-27,137