Here’s an easy one?
How do I supress the Manipulate statement and code and just show the output graphics in the cdf.
I’m using the browser plug in route.
Here’s an easy one?
How do I supress the Manipulate statement and code and just show the output graphics in the cdf.
I’m using the browser plug in route.
You can copy your manipulate cell into a new notebook and deploy that.
Or programmatically, you can do something like this:
CreateDocument[ Manipulate[x,{x,0,1}] ]
and deploy that.
Or more directly, use the CDFDeploy function:
CDFDeploy["test.cdf", Manipulate[x, {x, 0, 1}]]
Here is an example of how that ends up looking (with my added html surround code):
[http://members.wolfram.com/arnoudb/test.html
http://reference.wolfram.com/mathematica/ref/CreateDocument.html](http://reference.wolfram.com/mathematica/ref/CreateDocument.html)
http://reference.wolfram.com/mathematica/ref/CDFDeploy.html
Hello William, I am trying to develop some interactive tutorials where I provide the student with some textual background in a Mathematica CDF followed by interactive examples. But I would like to suppress (hide) all the code, mainly because the product looks less messy if it is not cluttered up with a lot of stuff that the student does not require. Sounds as if you have already accomplished that from the example you give. Can you please tell me how I can accomplish what I want to do or at least direct me to the part of the Documentation Center that deals with this sort of issue. It must turn up quite a lot. Thanks
One way to do this generally for a full notebook is to (on a Mac) is first to create a duplicate of your notebook. Then Option-click on the cell bracket of an input cell–this selects all Input cells. You can then delete all in the selected input cells and save the new notebook and/or export it as a CDF.
Another way to programmatically do this is, in the original notebook, paste in the following code and then execute it:
Module[{nb, nbg,},
nb = EvaluationNotebook[];
nbg = NotebookGet[nb];
nb = NotebookPut[nbg];
NotebookFind[nb, "Input", All, CellStyle];
NotebookDelete[nb]
]
This will create a new notebook from the original one with all the Input cells deleted. Of course you need to have executed the original input cells in the original notebook before executing this code in it.
I am struggling with the general approach to this myself Hamish!
I have done some experimenting setting up string variables then just displaying them using the techniques above to suppress source code display.
At the moment it seems all the text in the text variables has to be in the source code as you cannot load files from cdf.
Maybe the new cloud computing will completely transform this though?
Over to the experts …
I enclose a description of a method that works for me. When creating a CDF that contains a Manipulates output only. And not the source code. The example is from v10, but it works equally well in v9.
After digesting your various helpful suggestions I have developed the following plan:
Hans, looks like my plan is the same as the procedure you used in your example. I have tried it and it works in the way that I wanted.
Good to hear Hamish. And, in my experience, it is a very practical and robust method.