Message Boards Message Boards

2
|
14439 Views
|
8 Replies
|
7 Total Likes
View groups...
Share
Share this post:

How to suppress display of input source in a displayed cdf file?

Posted 11 years ago
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. 

http://www.dialbohm.org/wrcs/test1.html
POSTED BY: William Stewart
8 Replies
Posted 10 years ago

Good to hear Hamish. And, in my experience, it is a very practical and robust method.

POSTED BY: Hans Milton
Posted 10 years ago

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.

POSTED BY: Hamish Small
Posted 10 years ago
POSTED BY: Hamish Small
Posted 10 years ago

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.

Attachments:
POSTED BY: Hans Milton

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.

POSTED BY: David Reiss
Posted 10 years ago

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

POSTED BY: Hamish Small

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 ...

POSTED BY: William Stewart
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/CDFDeploy.html
POSTED BY: Arnoud Buzing
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract