On Jan 22, 2006, at 3:54 PM, Charilaos Skiadas wrote:
On Jan 22, 2006, at 2:37 PM, Gary L. Gray wrote:
s/(?<=\\|sub)sub/ /g; # replace all leading "sub"
with an em-space
Try to replace the s in the first sub with (s|S) This tells the regexp engine to match either an s or an S at that point. Have a look at this document for more on regular expressions used in textmate: http://www.geocities.jp/kosako3/oniguruma/doc/RE.txt
Thank you. Though this doesn't seem to matter (see below).
Then you also need to change the latex syntax to recognize your (sub)sections as having scope meta.section.latex
What does that mean? What does that do for me? Again, see below.
In particular, in the LaTeX language file, you will find the line:
begin = '((\(?:(?:sub)*section|chapter|paragraph|part))(*?)(?:([) [^[]*?(]))??({))';
near the top.If you change the first "s" there to (s|S) instead, that might do it (haven't tested it).
Interestingly, I only made the second change and it appeared to recognize my sectioning commands without making the first. That is, I made the change to the LaTeX language file as:
begin = '((\(?:(?:(s|S)ub)*section ...
and the function pop-up now shows (I hope attachments are ok):
which is, I suppose, what I would expect. It doesn't seem to change anything if I include the change in the symbol list.
In fact, I just did a test and made the change only in the symbol list and then the function pop-up does not find my sectioning commands that start with an upper-case "s". See:
This will also be matching stuff like \SubSubsection, I hope that's alright.
That is no problem, though I must admit to being a bit confused at this point. :-)
-- Gary