[TxMt] LaTeX diplaymath mode problems
Charilaos Skiadas
cskiadas at uchicago.edu
Mon Nov 7 00:24:38 UTC 2005
On Nov 6, 2005, at 6:00 PM, Brad Miller wrote:
> I think I see the problem. If you check the scope of the word
> right before the first $$ 'integrals of the form ...' You will
> see that the scope of those words is meta.function.with-arg.tex
> This is because all of this text is contained inside the command
> that starts \comment{My research...
>
> My first question is, is this really what you want?
>
Yes, it is a very unusual use of a command I have to admit, but I use
it 'comment out' parts that I want there, but not deleted, in case I
want them in later on. I just define a command at the beginning:
\newcommand{\comment}[1]{}
so that it is all omitted out, but if I want it there I'll just
change the command to read:
\newcommand{\comment}[1]{#1}
> The meta.function.with-arg.tex rule recursively matches anything
> inside the { } by including source.tex.
>
> So, by moving the displaymath rule into the TeX syntax file that
> will help.
> I have tried recursively including the LaTeX syntax but things got
> really ugly when I did that.
> So, I think it is time for some more work.
> I need to look at both the TeX and the LaTeX syntax definitions and
> be very careful about what goes in each. I've always been pretty
> casual about the difference between the two, but here is an example
> where that causes problems.
>
> I'll try moving a few things around and see if that helps in the
> short term anyway.
>
So, our problem in general is that, inside LaTeX code, we want to
allow patterns that appear in the TeX syntax, but in such a way that
they understand that they have LaTeX power, i.e. that they can
recognize anything in the LaTeX syntax, not just the TeX syntax. Not
sure if this is possible as things are right now.
I don't think it would be correct to include the LaTeX syntax in TeX
either, since if the file is an actual TeX-file and not a LaTeX-file
there shouldn't be LaTeX code in it. Not sure what the right way to
structure things is. I do like the idea of TeX commands being in
their own syntax file, and the other syntaxes inheriting from them,
but I am not sure what the best way to implement this would be then.
For now I am happy with things being the way they are. This problem
doesn't really appear in most regular uses of the bundle.
> Brad
>
>
Haris
More information about the textmate
mailing list