[TxMt] Re: LaTeX math mode delimiters

Charilaos Skiadas cskiadas at gmail.com
Fri Aug 22 17:24:19 UTC 2008


On Aug 22, 2008, at 1:07 PM, Keith Penrod wrote:

> The syntax highlighting for LaTeX math mode is very good.  I have
> noticed, however, a discrepancy in the way the highlighting and the
> automatic delimiters are treated.  I mean, normally typing a $ will
> automatically generate a second one (after the cursor) to end the math
> mode.  However, I have found that this fails when a command in math
> mode spans multiple lines.  That is, if there is a hard return in math
> mode, then the delimiters behave incorrectly eventhough the syntax
> highlighting is correct.
>
> Here's an example:
> $math stuff
> that spans two lines$ when I put a $ here it thinks I'm closing the
> math mode from the first dollar sign on this line of code rather than
> thinking I'm starting a new math mode.
>

Interesting, I hadn't noticed it before. I have no idea why this  
might be happening, Allan might have some insights. It's not  
something we can really control from the bundle. Of course, a simple  
solution is to use \( ... \) instead, which is quite unambiguous  
about where it starts and where it ends.

> Keith Penrod
>

Haris Skiadas
Department of Mathematics and Computer Science
Hanover College







More information about the textmate mailing list