2

I am using TeXnicCenter and MiKTeX 2.9. This problem has never happened to me before, please refer to the images I attached below. Essentially out of no where, my text became pink, although everything still works fine (except TeXnicCenter now doesn't highlight corresponding brackets), I am wondering how to get rid of this pink text and why does it happen?

EDIT: I realised the pictures may be too small to see on here, it'd be best to save them onto your computer as that makes it visible.

enter image description here enter image description here enter image description here

Mensch
  • 65,388
TrueTears
  • 1,617
  • 2
    Not related to the question just an observation: Why is the chunk of code so big on line 65? You can hit return to break up the long code lines instead of just typing until the code wraps and it wont mess up the code. – dustin Aug 08 '13 at 17:05
  • @dustin True, I should have split it up, I guess I didn't feel the need to heh. – TrueTears Aug 08 '13 at 17:17
  • 1
    Please add the TeX code into your question. Then I can copy it and check it with my TeXnicCenter ... – Mensch Aug 08 '13 at 17:57
  • Note @dustin — syntax highlighting stopped near the end of the line. Related?? – Sean Allred Aug 08 '13 at 18:12
  • @SeanAllred could be. Maybe a missing } but its hard to tell since it is all jumbled into run on lines of code. – dustin Aug 08 '13 at 18:38
  • @dustin No missing brace---not only do I not see one, but there is no way this was hand-written. This is machine-generated from some other software solution. The syntax coloring simply stops. – Sean Allred Aug 08 '13 at 19:40
  • 1
    @Sean Allred I hand wrote this myself. The reason I didn't line break was because I used to run into errors and things whenever I line-breaked during an align environment, so I got into the habit of not doing it. Anyhow, it seemed like the reason was because line 65 had too much codes stuffed into one line, after doing a few line breaks, it resolved the issue. – TrueTears Aug 09 '13 at 05:48

1 Answers1

5

Without an MWE it is literally impossible to tell, but this looks like a small bug in TeXnicCenter. I believe breaking up your lines into smaller segments will fix the issue. The pink is likely the color the developers used to indicate that something has gone wrong (in this case, a buffer overflow is likely). This would also explain the missing functionality to match braces; if the length of your line has crashed the syntax parser, then there is no reliable way for TeXnicCenter to tell which brace matches which where, and so it simply doesn't try (in an effort not to lie).

Since this is math mode, single linebreaks are not significant (unless, of course, you break at a control sequence (in blue)). Insert a few line breaks, and maybe try to make the source more readable if you can or want to. (I'm assuming this is a software-generated TeX fragment.)

As you're going through, if you so desire, you may also want to take a look at

Sean Allred
  • 27,421