[TxMt] LaTeX grammer for subscript

Guido Governatori guido at itee.uq.edu.au
Sun Nov 11 21:46:03 UTC 2007


I'm trying to define a scope for LaTeX subscript/superscript.

The language I have defined is as follows:

{	scopeName = 'text.tex.latex.guido';
fileTypes = ( 'tex' );
patterns = (
{	name = 'sscript.math.tex';
match = '(?<!\\)(?:_|\^)\{.*\}';
},
{	include = 'text.tex.latex'; },
{	include = 'text.tex.math'; },
);
}

The above language seems to work properly in LaTeX math and LaTeX  
math environnments. However, the scope is not recognised in plain TeX  
math, that is in cases like $X_{as}$ shift-ctrl-P does not show the  
newly defined scope in the tooltip.

I have tried different includes to no avail.

All the best

Guido

--
Dr Guido Governatori
School of Information Technology and Electrical Engineering
The University of Queensland
Brisbane, Queensland, 4072, Australia
Phone: +61-(0)7-336 52907
Fax: +61-(0)7-336 54999
http://www.governatori.net/TextMate
http://www.defeasible.org





More information about the textmate mailing list