[texworks] syntax pattern for inmath
st.loeffler at gmail.com
Wed Feb 3 18:53:24 CET 2010
2010/2/3 kap4lin <kap4lin at gmail.com>
> On Wed, Feb 3, 2010 at 9:42 AM, Stefan Löffler <st.loeffler at gmail.com>
> > Am 2010-02-03 14:19, schrieb Herbert Schulz:
> >> For curiosities sake... what happens if you use $$...$$ for displayed
> math equations? I see this quite a bit even with LaTeX.
> > With "\$[^\$]+\$", I'd assume that everything between an including the
> > inner $ signs would be colored, but not the outer $ signs. But you could
> > easily adjust the regexp to work for both cases by simply saying
> > "\$+[^\$]+\$+" (which will actually match one or arbitrarly more $
> So in $e=mc^2$ is it possible to have "e=mc^2" in limegreen but the
> left and right "$"s in red?
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.
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 ;)).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the texworks