Hi Todd, On Sat, Apr 21, 2007 at 04:50:19PM -0400, Todd Wilson wrote: > I sent the message quoted below to texmacs-users without any response. > However, instead of just resending it here, I want to ask a different > question. I've skimmed through the source code and have found it quite > well-organized and readable, and I might have some time coming up that I > could use to contribute to the development myself. Can someone outline > what I would have to do to *add* math codes to TeXmacs (which I assume > it doesn't already have)? I found the file > > /usr/share/TeXmacs/langs/mathematical/syntax/texmath.syx > > which already seems to have most of what I would need in place; I'd > just need to introduce something that could change the Type (or Class?) > of a symbol so that it would be rendered appropriately. I'm guessing > something like > > <as-class|(class)|(character)> or <as-type|(type)|(character)> > > Any ideas?
In this form, this would require some hacking of the C++ code (so as to retrieve the classes from texmacs.syx). Alternatively, one might simply define a few macros "mathord", "mathbin", etc. with the correct presentation for different types. Notice that operator types are not very well implemented in TeXmacs: I really should compute spacing as a function of the operator types of the left and right hand sides. As long as this is not done (in C++), the macro-solution is sufficient. > >Is there in TeXmacs an equivalent of TeX's \mathord, \mathbin, > >\mathrel, etc.? There are times when TeXmacs's default spacing in > >formulas is not correct. For example, when using ":" as a binary > >relation, as in typing judgments, I'd like to use it as a \mathord in > >declarations on the left of the turnstile and in quantifiers and > >lambda abstractions, and use it as a \mathrel on the right of the > >turnstile. Another interesting idea (already used occasionally) is to define different TeXmacs symbols for the same glyphs. You might have a normal ":" and additional symbols "semicolon", "oftype", etc. with different types. Best wishes, Joris _______________________________________________ Texmacs-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/texmacs-dev
