Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is \\ for? Help finds nothing on it. An odd number of backslashes greater than one are grouped by two and the last one is displayed with a different color. This indicates that it should mean something.

There also is a (connected?) little bug in the frontend (Mma 8.0, W7). When a text what is ended by the odd number of backslashes is commented with Alt+/, pressing the combination again leads not to uncommenting, but to further commenting like this:



share|improve this question
up vote 6 down vote accepted

From the tutorial Special Characters - Strings And Characters

enter image description here


enter image description here

Comment/Uncomment behavior you describe also happens in version on Vista.

share|improve this answer
Thanks. Judging from this a combination \* is also treated specially (that could prevent Mma from recognizing the ending of the comments *)), though it is not mentioned in help. – Andrew Apr 22 '12 at 9:36
@Andrew, thanks for the accept. Un/Comment function behaves differently depending on the selection. For example, when the selection is cell bracket, Un/Comment works as you expect. From the code for the Un/Comment function in the file in the directory $InstallationDirectory\SystemFiles\FrontEnd\TextResources, you can see how it treats various selection cases. – kglr Apr 22 '12 at 11:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.