In auctex mode, \it displays as italic, including the backslash. An italic backslash ends up looking a lot like a pipe. Please don't italicize the backslash. Thanks, Josh Triplett
forwared 624735 auctex-devel@gnu.org Josh Triplett <josh@joshtriplett.org> wrote: Is this still the case in recent auctex? Regards, Frank
* Frank Küster (2011-05-01) writes: Yes. But only if the \it is not preceded by an opening brace.
I only run auctex from the Debian package, and this represents the latest version in unstable. A quick check upstream suggests that 11.86 represents the latest upstream release as well. So, yes? :) - Josh Triplett
Ralf Angeli <angeli@caeruleus.net> wrote: So you would actually call it a feature? Regards, Frank
* Frank Küster (2011-05-03) writes: I'd say yes. Fontifying the whole macro looks more consistent to me than fontifying only the part after the backslash.
Doing so makes the '\' look like a '|'. - Josh Triplett
* Josh Triplett (2011-05-09) writes: I'm using DejaVu Sans Mono with a size of 17 pixels here and the two characters can be distinguished easily. Maybe the font you are using is suboptimal? Also, in which context or use case would it be a big problem if the characters where not easily distinguishable?
DejaVu Sans Mono here as well. I can distinguish the characters, but I wouldn't say "easily"; it takes staring at the unusual-looking italic '\' more than once. :) In my case, I encountered this problem when staring at a complex TeX macro, which ran several commands in a row, along the lines of \foo\it\bar\baz. The italic '\' characters caused by the formatting of \it caused me quite a bit of confusion when trying to decipher it, until I figured out that they really did represent backslashes. It took me some time to parse the \it in the first place, since I didn't see the characteristic '\'. - Josh Triplett
* Josh Triplett (2011-05-10) writes:
You'll have the same problem with something like \foo{\it\bar}. And in
Emacs' standard LaTeX mode it will be the same even without the braces.
Anyway, the font locking in AUCTeX always fontifies the whole macro,
including the backslash. I don't think it would be a good idea to break
this habit for one particular case.
In case this is really a huge problem for you, you can change the call
to `store-match-data' in `font-latex-match-command-in-braces' from
(store-match-data (list (point) (point)
(point) (point)
cbeg cend))
to
(store-match-data (list (point) (point)
(point) (point)
(1+ cbeg) cend))