[OS X TeX] Unexpected TS coloring of uncommented text

Alain Schremmer schremmer.alain at gmail.com
Wed Oct 13 15:44:14 CEST 2010


On Oct 13, 2010, at 9:21 AM, Themis Matsoukas wrote:

> I noticed the following reproducible quirk in Texshop (2.37):
>
> 1. create a comment with a % at the beginning of a line and some  
> text after it:<1.png>
>
> 2. Place the cursor right after the % and hit return: the line is  
> broken but the second line is colored as a comment.<2.png>
>
> 3. Place the cursor on line 4 (or several lines below these  
> comments, it doesn't seem to matter ho many:<3.png>
>
> 4. Back-space to line 3, and voila! Line 2 is not in red any more.
>
> <4.png>
>
> This must have been introduced in the latest version of TS because  
> I don't seem to recall this behavior before.


That is because TeX doesn't like blah blah blah. If you type  
mathematics instead ...

  Actually the behavior, at least with TeXShop 2.26, is a bit more  
complicated:

If you place say twenty lines of text before % blah blah blah, the  
behavior is as you describe but if you do the same in a smaller  
window so that there is a scroll bar the behavior is correct. Also,  
if you do it in a big window and then change the window the slightest  
little bit, blah blah blah will get black.


This seems to be related to the fact that when you make a find and  
replace, the comments in the affected part turn black but revert to  
red as soon as you change the window the slightest little bit.

Regards
--schremmer




More information about the macostex-archives mailing list