Hi<br><br><div class="gmail_quote">2010/2/3 kap4lin <span dir="ltr"><<a href="mailto:kap4lin@gmail.com">kap4lin@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Wed, Feb 3, 2010 at 9:42 AM, Stefan Löffler <<a href="mailto:st.loeffler@gmail.com">st.loeffler@gmail.com</a>> wrote:<br>
> Am 2010-02-03 14:19, schrieb Herbert Schulz:<br>
>> For curiosities sake... what happens if you use $$...$$ for displayed math equations? I see this quite a bit even with LaTeX.<br>
>><br>
><br>
> With "\$[^\$]+\$", I'd assume that everything between an including the<br>
> inner $ signs would be colored, but not the outer $ signs. But you could<br>
> easily adjust the regexp to work for both cases by simply saying<br>
> "\$+[^\$]+\$+" (which will actually match one or arbitrarly more $ signs).<br>
<br>
</div>So in $e=mc^2$ is it possible to have "e=mc^2" in limegreen but the<br>
left and right "$"s in red?<br></blockquote><div><br>No, not at the moment. It may be possible to have "$e=mc^2" in limegreen, though (using lookahead assertions). This could be enabled by implementing the "highlight only the first captured group" idea I mentioned earlier.<br>
<br>My approach was just to consistently highlight "$$e=mc^2$$", i.e. highlight the complete expression, not just the inner "$e=mc^2$" (in fact, my latest regexp would also highlight the complete expression "$$$$$e=mc^2$$$$$", though this probably is nothing you'd actually write ;)).<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
</blockquote></div>Regards,<br>Stefan<br>