I've found a problem with the syntax highlighting in the LaTeX bundle. I use the Cobalt theme, and normally the argument of a citation command such as `\citeauthor` appears in purple. However, I have the following line in a document I am writing:
\section{\citeauthor{kager:1999}'s analysis}
The arguments to section commands normally show up gold-colored for me, and "analysis" appropriately does so here. However, the `kager:1999` part also does, which I believe is incorrect since it is not part of the actual section title but rather a bibliography keyword and thus should be purple.
Not a huge problem, but I wanted to point it out. I would fix it if I had time to learn TextMate's grammar system -- as I said, I'm currently writing a paper. :-)
On 12/10/06, Aaron Jacobs aaronjjacobs@gmail.com wrote:
\section{\citeauthor{kager:1999}'s analysis}
Here's another problem: the line quoted above also causes the Document Outline feature to not work properly, cutting off the name of the section at the closing curly brace.
On Dec 10, 2006, at 8:39 PM, Aaron Jacobs wrote:
Here's another problem: the line quoted above also causes the Document Outline feature to not work properly, cutting off the name of the section at the closing curly brace.
Yes, the current outline command is very simplistic, it would take a lot harder work to deal with nested braces, probably hurting the performance a bit.
Haris
Ok, r6322 puts in a stopgap measure that lets it deal with a single level of nested braces.
I'm not sure if this really needs to handle any more levels than this. Doing so would definitely require re-writing it to work differently, but until somebody comes up with an example where they need doubly-nested braces, this will probably do fine.
On Dec 10, 2006, at 8:55 PM, Charilaos Skiadas wrote:
On Dec 10, 2006, at 8:39 PM, Aaron Jacobs wrote:
Here's another problem: the line quoted above also causes the Document Outline feature to not work properly, cutting off the name of the section at the closing curly brace.
Yes, the current outline command is very simplistic, it would take a lot harder work to deal with nested braces, probably hurting the performance a bit.
The solution to this is to edit the LaTeX syntax.
The part that defines how \section commands are treated interprets the contents as 'text.tex'. Changing that to 'text.tex.latex' allows it to colorize your \citeauthor properly. That said, I don't know if it causes any problems, so I'm not going to make the change right now.
cskiadas, do you have any input?
On Dec 10, 2006, at 8:09 PM, Aaron Jacobs wrote:
I've found a problem with the syntax highlighting in the LaTeX bundle. I use the Cobalt theme, and normally the argument of a citation command such as `\citeauthor` appears in purple. However, I have the following line in a document I am writing:
\section{\citeauthor{kager:1999}'s analysis}
The arguments to section commands normally show up gold-colored for me, and "analysis" appropriately does so here. However, the `kager:1999` part also does, which I believe is incorrect since it is not part of the actual section title but rather a bibliography keyword and thus should be purple.
Not a huge problem, but I wanted to point it out. I would fix it if I had time to learn TextMate's grammar system -- as I said, I'm currently writing a paper. :-)
Ok, he told me on IRC he thinks it's fine.
I've now switched it to use $self instead of text.tex as of r6321.
On Dec 10, 2006, at 8:48 PM, Kevin Ballard wrote:
The solution to this is to edit the LaTeX syntax.
The part that defines how \section commands are treated interprets the contents as 'text.tex'. Changing that to 'text.tex.latex' allows it to colorize your \citeauthor properly. That said, I don't know if it causes any problems, so I'm not going to make the change right now.
cskiadas, do you have any input?
Thanks to Kevin's quick work, both of these problems should now be fixed. At least for a depth of 1 nesting in the braces.
Haris
On 12/10/06, Charilaos Skiadas skiadas@hanover.edu wrote:
Thanks to Kevin's quick work, both of these problems should now be fixed. At least for a depth of 1 nesting in the braces.
Sweet. The outline one isn't a big deal, but I thought I would note it just for the sake of completeness.