Home Download Buy Blog Forum Support

latex highlighting bug

latex highlighting bug

Postby cartazio on Fri Aug 26, 2011 6:29 pm

Hey All,
is there any fix for the highlighting bug in latex math expressions as follows?
basically in the math environments associated begin ... end equation or equation *, {} matching is broken after a subscript symbol _

attached is a screen shot
Attachments
Screen Shot 2011-08-26 at 2.27.21 PM.png
Screen Shot 2011-08-26 at 2.27.21 PM.png (19.46 KiB) Viewed 1646 times
cartazio
 
Posts: 13
Joined: Fri Aug 26, 2011 6:25 pm

Re: latex highlighting bug

Postby cartazio on Fri Aug 26, 2011 7:04 pm

actually, heres another example:
Attachments
Screen Shot 2011-08-26 at 3.03.30 PM.png
Screen Shot 2011-08-26 at 3.03.30 PM.png (14.19 KiB) Viewed 1639 times
cartazio
 
Posts: 13
Joined: Fri Aug 26, 2011 6:25 pm

Re: latex highlighting bug

Postby sfranky on Fri Aug 26, 2011 8:26 pm

sorry mate, I can't help you, but can you please tell me the font and theme you are using?? they look nice :)
sfranky
 
Posts: 96
Joined: Mon Oct 19, 2009 10:06 pm

Re: latex highlighting bug

Postby cartazio on Fri Aug 26, 2011 11:32 pm

the theme is "ForLatex", found at http://wiki.macromates.com/Themes/UserSubmittedThemes
its probably one of the few themes i've found over time that minimize the staring into a flashlight effect while still having good constrast

and the font is anonymous pro found at http://www.ms-studio.com/FontSales/anonymouspro.html
(both free).


the brace / paren matching bug also hold for commands in these env's, eg \command{arg} will flub the brace matching.
Since I think the syntax files are the same as those from textmate (am I correct in thinking this?), this makes me think that its a bug in how sublime text handles them.... I might be wrong. Its not a big problem, though I do find it a tad annoying
cartazio
 
Posts: 13
Joined: Fri Aug 26, 2011 6:25 pm

Re: latex highlighting bug

Postby jps on Sun Aug 28, 2011 1:27 pm

This should now be fixed in 2107
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: latex highlighting bug

Postby cartazio on Mon Aug 29, 2011 12:43 am

awesome! is that the pending next beta update or dev release? (also i'm curious what the cause of the bug was)
cartazio
 
Posts: 13
Joined: Fri Aug 26, 2011 6:25 pm

Re: latex highlighting bug

Postby cartazio on Mon Aug 29, 2011 12:46 am

i see its the current dev release
cartazio
 
Posts: 13
Joined: Fri Aug 26, 2011 6:25 pm

Re: latex highlighting bug

Postby cartazio on Wed Aug 31, 2011 9:50 pm

the syntax coloring problem seems to be fixed, but the cursor positioned highlight the matching pair seems to still be broken in those
latex math environments.

see attached screen shots.

Really happy about the polish added in the newest beta, but this getting fixed would be awesome too :)
Attachments
Screen Shot 2011-08-31 at 5.48.53 PM.png
Screen Shot 2011-08-31 at 5.48.53 PM.png (12.41 KiB) Viewed 1565 times
Screen Shot 2011-08-31 at 5.48.13 PM.png
Screen Shot 2011-08-31 at 5.48.13 PM.png (15.56 KiB) Viewed 1565 times
cartazio
 
Posts: 13
Joined: Fri Aug 26, 2011 6:25 pm

Re: latex highlighting bug

Postby jps on Sat Sep 03, 2011 12:00 pm

The brackets don't match at that point because the .tmLanguage file assigns them a string scope. Brackets in strings are specifically excluded from bracket matching, to avoid breaking on situations like:
Code: Select all
append("(")
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: latex highlighting bug

Postby ratberryjam on Fri Oct 21, 2011 8:42 pm

The brackets don't match at that point because the .tmLanguage file assigns them a string scope. Brackets in strings are specifically excluded from bracket matching


That's too bad, because it really makes typing math a pain in the butt, especially when you have to type stuff like
Code: Select all
$(R/M)[[X]]$

a lot. TextMate doesn't exclude strings from bracket matching, so this problem doesn't arise. I see how it would be annoying if you type stuff like
Code: Select all
append("(")

often, but I generally like bracket matching in strings. Could this be made user-configurable (or is it already)?

EDIT: Oh, and I think Sublime Edit 2 is really great!
ratberryjam
 
Posts: 2
Joined: Fri Oct 21, 2011 8:19 pm


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 7 guests