[TxMt] adding to or modifying the symbol list for LaTeX?
Charilaos Skiadas
cskiadas at uchicago.edu
Sun Jan 22 20:54:26 UTC 2006
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
Then you also need to change the latex syntax to recognize your (sub)
sections as having scope meta.section.latex
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).
This will also be matching stuff like \SubSubsection, I hope that's
alright.
Haris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20060122/a139bea1/attachment.html>
More information about the textmate
mailing list