Bug introduced in 10.0 and persisting through 10.2 or later
This is a very weird bug and I don't really know how to reproduce it, so I'll just copy-paste the whole code
Manipulate[Row[{DensityPlot[
Cos[k Norm[{x, y} - d {0, 2}] - f Pi t]/Norm[{x, y} - d {0, 2}] +
Cos[k Norm[{x, y} - d {0, -2}] - f Pi t]/
Norm[{x, y} - d {0, -2}], {x, 0, 10}, {y, -5, 5},
PlotPoints -> 50, ImageSize -> 300, PlotTheme -> "Minimal"],
Rotate[Plot[(200 + Abs[-2 d + y]^2 + Abs[2 d + y]^2 + 2 Sqrt[(100 + Abs[-2 d + y]^2) (100 + Abs[2 d + y]^2)]Cos[k (Sqrt[100 + Abs[-2 d + y]^2] - Sqrt[100 + Abs[2 d + y]^2])])/(2 f (100 + Abs[-2 d + y]^2) (100 + Abs[2 d + y]^2)), {y, -5, 5}, ImageSize -> 280], -Pi/2]}], {t, 0, 15}, {{f, 5}, 1, 10}, {{k, 5}, 1, 10}, {{d, 1}, 0.5, 3}]
Basically this is a simulation of the double-slit interference experiment with a plot of the intensity to the right. Note that all the squares have to be written by Ctrl-6 so that they are superscript! So, the code looks like this when I open the notebook
Now try changing the PlotTheme
by adding a second name, like "Monochrome"
. Suddenly, all brackets and parentheses go red. Upon evaluation, Mathematica spits out errors as if there are no closing brackets. It seems like everything breaks down the moment I enter the quotation marks ""
.
It is possible that this is a Mac-only bug.
SuperscriptBox
es misplaced, and the second quote causes it to be reinterpreted as code. Seems like a bug. Try using^
instead of superscripts. Report it to Wolfram. (Caveat: I have the last beta V10, Mac OSX 10.9.4.) $\endgroup$