[TxMt] LaTeX diplaymath mode problems

Charilaos Skiadas cskiadas at uchicago.edu
Mon Nov 7 00:52:16 UTC 2005


On Nov 6, 2005, at 6:22 PM, Brad Miller wrote:

> Next question:   \comment appears to be your own block comment  
> function.  So, Should any of the latex that follows be scoped as  
> anything other than a comment?  Since \comment is your own function  
> the answer is probably no, but how to know what should work and  
> what shouldn't
>
> The problem for me is that it is not clear what LaTeX/TeX  
> constructs are legal to embed in what other constructs.  For a  
> simple example, replace \comment with \textbf  Strangely, all the  
> text inside the textbf does not bold the text that was previously  
> commented.  Nor does it produce an error.  Other times I have tried  
> to put latex environments inside TeX commands and they result in  
> errors....
>
It's not a question of comments really. The point is that users can  
define their own commands to do whatever they want, and the arguments  
to the commands should in theory be allowed to be arbitrary LaTeX  
code, and hence should be treated as such. For instance I might  
decide, just as a hypothetical example, to use a command called  
\double, which just creates two copies of its argument, i.e.
\newcommand{\double}[1]{#
#1}
Then I would expect something like: \double{$x^2+1=0$} to recognize  
$x^2+1=0$ as math, which it does at the moment. The problem is that  
these commands are caught by the TeX syntax, so of course can only  
see stuff from the TeX syntax. Maybe an option would be to have them  
be caught by the LaTeX syntax also? It would be duplicating code,  
that's why I don't particularly like it as an approach
  I want to find the time to look more deeply into the LaTeX bundle  
stuff, but haven't had the time for it, and won't have for another  
month. I think for now the best thing is to pile stuff up in the  
test.tex file. Things work out fine for most people, and most of the  
times, so we can worry about such details a bit later.

> That said, I moved the displaymath declarations into the TeX syntax  
> file and all appears to be scoped correctly.  in your document.
>
Thanks.
> I'm going to do a  bit more testing and then I'll commit the change.
>
> Brad
>

Haris





More information about the textmate mailing list