From: David G. <go...@py...> - 2003-01-24 02:53:39
|
Mukund Deshpande wrote: > Thanks for a detailed response. Let met give some examples, I am mainly > using math in two ways (i) inline math and (ii) math displayed on its own. I didn't realize that "itex" was a separate dialect of TeX. I found a description of itex at <http://pear.math.pitt.edu/mathzilla/itex2mmlItex.html>. For math displayed on its own I would suggest calling the directive "itex", and implementing it like this:: .. itex:: \alpha_t(i) = P(O_1, O_2, \dots O_t, q_t = S_i \lambda) Since the directive knows its context, the \[ and \] delimiters wouldn't be necessary. They could be added on by the directive code before it calls the itex2MML program, if required. For inline math, an interpreted text role would be appropriate:: Given the HMM model (`\lambda`:itex: = (A, B, `\pi`:itex:)) and a sequence of symbols `O = <O_1, O_2, \dots ,O_T>`:itex:, ... Again, the delimting $'s should be left off. If the default interpreted text role was set to "itex", the ":itex:" role tags could be left off too. Eventually there will be a directive and/or command-line option to set the default role at runtime. Note though that since Docutils can handle all the text encodings Python can, you don't really need the "\lambda" and "\pi" markup. You could simply use UTF-8 and insert those characters directly. > MathML is very verbose format so I don't think I will be directly typing > mathml in any of my documents. I will stick with > Tex math notation as it is widely used and easy to understand. Compared to MathML and other math notations, itex does seem easy to understand, but it's much less readable than the rest of the text and markup. But I suppose there's no way around it in this case. > Let me see if I can implement the tex-math:: directive and tie > it with itex2mml. I will keep you posted... Please do, and let us know if you need any help. The doc...@li... mailing list would be the best place for it. -- David Goodger http://starship.python.net/~goodger Programmer/sysadmin for hire: http://starship.python.net/~goodger/cv |