MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Shift-Ctrl-N and Manipulate

  • To: mathgroup at smc.vnet.net
  • Subject: [mg114885] Re: Shift-Ctrl-N and Manipulate
  • From: John Fultz <jfultz at wolfram.com>
  • Date: Tue, 21 Dec 2010 00:20:45 -0500 (EST)
  • Reply-to: jfultz at wolfram.com

This is not the behavior I see.  What I'm seeing is that the Input style leaves 
the following expressions (for example), alone when converted:

Graphics[{Point[{1,1}]}]
Manipulate[x,{x,0,1}]
Slider[1]

while the Output style causes them to convert to the graphics and interfaces.  
The critical option which is different between the Input and Output styles is 
the ShowStringCharacters option.  So, for example, this converts to a graphic...

Cell["Graphics[{Point[{1,1}]}]","Input",ShowStringCharacters->False]

while this one doesn't...

Cell["Graphics[{Point[{1,1}]}]","Input"]

(and yes, I didn't use the box forms for simplicity, but the same thing is true 
for the box forms)

All of this is true for both v7 and v8, so I'm not at all certain that upgrading 
to v8 was the actual cause of this for you.  Instead, this suggests to me that 
you may have an option or stylesheet setting which is unwittingly contaminating 
the process.  I don't know how much you know about such things and whether you 
are likely to have deliberately or accidentally set one of these options. An 
easy thing to do would be to reset the FE's preferences, which you can do by
holding Ctrl+Shift while starting Mathematica (or Cmd+Shift on Mac).  If you
have any custom settings for the front end, this will clean them out.  But the 
rogue setting might be specifically on a given notebook or on a stylesheet 
you've created, as well...there are too many possibilities to run down without 
getting some more information from you.

Sincerely,

John Fultz
jfultz at wolfram.com
User Interface Group
Wolfram Research, Inc.


On Sun, 19 Dec 2010 05:09:56 -0500 (EST), =D7'=D7=A8=D7=A7 =D7=A9=D7=95=D7=A9=D7 =D7=E2=84=A2 wrote:
> Hi everyone,
>
> In previous versions of Mathematica, I could use the shortcut Shift-Ctrl-
> N or the menu option Cell -> Convert To -> StandardForm to clean up and
> format my code, for example, turn x^2 into a real superscript or x/y into
> a real fraction.
>
> However, after upgrading to Mathematica 8, this option also automatically
> converts functions such as Manipulate or Slider into the actual output of
> the function. The entire code I wrote for the Manipulate applet becomes
> the actual applet, and so it's not possible to change the code any more.
> Ctrl-Z, of course, doesn't work, and the only way to get my code back is
> Shift-Ctrl-I or Cell -> Convert To -> InputForm, which makes it even
> uglier...
>
> This means that I cannot use Shift-Ctrl-N to clean up and format my code
> anymore if it contains a Manipulate or any similar function. Usually the
> converted Manipulate code will not even work after using this option, for
> example if it depends on variables that have not yet been defined.
>
> In conclusion, how can I clean up or format my code without converting
> the Manipulates? Is there another shortcut or option I can use? Or maybe
> there's a way to tell Mathematica not to convert the Manipulates?
>
> Thank you,
> Barak



  • Prev by Date: Re: Mathematica daily WTF
  • Next by Date: Re: Shift-Ctrl-N and Manipulate
  • Previous by thread: Re: Shift-Ctrl-N and Manipulate
  • Next by thread: "Accumulate" with operator Times.