[TxMt] Problem with LaTeX bundle

Charilaos Skiadas skiadas at math.uchicago.edu
Sun Jun 5 22:51:38 UTC 2005


On Jun 5, 2005, at 3:28 PM, Frank Schönmann wrote:

> hi
>
> I don't know who's responsible for the LaTeX bundle, so I'm writing 
> about it here. There are some issues in which I think it should be 
> improved.

> In particular, there's a problem with using " characters. I don't 
> think there are any " delimited strings in LaTeX, but instead " is 
> used to denote umlauts in German texts (e.g. to get ä you type "a). 
> So, whenever I use an umlaut the syntax highlighting doesn't work 
> anymore until the next umlaut because TM marks the text in between as 
> being in the invalid.string.latex scope. This IMHO serves no useful 
> purpose at all but nevertheless breaks the syntax highlighting. Could 
> anyone please fix this?

I just committed a fix. It was highlighted as invalid.string.latex, so 
that people would know and change it, since this is not the LaTeX way 
of quoting. I removed that pattern, and the corresponding smart-typing 
pair, but I at least still get two quotes when typing one, so not sure 
what is going on there, but the highlight is gone.

> I'd also like to have a scope representing environments. So you could 
> e.g. mark environments (something between and including \begin{} … 
> \end{}) with a special background setting to distinguish them from the 
> surrounding text.

Do you mean individual scope for different environments, or just 
capture each begin-end block? The entire document is contained within a 
\begin{document} \end{document} block, so any choice there would change 
how the entire document looks like, and any other groups contained in 
it would not be distinguished this way.
The other problem is that at the moment, as far as I can tell, we can't 
tell TM to look for arbitrary patterns within a pattern, and so if we 
want the inside of the environment to follow any of the patterns 
coloring the rest of the document, commands, math, etc, we would need 
to duplicate those patterns as subpatterns in it, and that would result 
in a lot of unnecessary patterns and other problems. That's the reason 
that inline math has one uniform coloring, and for instance commands in 
it do not get different colors.
So we could have begin-end blocks have one uniform color, and maybe 
exclude document and possibly list environments from this, but I am not 
sure this is the optimal way to go, so I was waiting until the 
subpattern thing is completely resolved.

The way it works right now is that it captures the begin line and the 
end line separately, so it doesn't even check that they agree or that 
they appear in pairs, which is not ideal I guess.

> If I have another idea I'll write about it here.

Please do.

> -- 
> bye, Frank!
>
Haris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2776 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20050605/e9682f66/attachment.bin>


More information about the textmate mailing list