Hello everyone,
I'm creating a series of student exams using a loop, CreateDocument, NotebookWrite, and CDFDeploy. Here is a code fragment (without exam questions) for creating one exam. It works well.
nb = CreateDocument[];
NotebookWrite[nb, Cell["EXAM", "Title"]];
NotebookWrite[nb, Cell["More Here", "Chapter"]];
NotebookWrite[nb, Cell["", "Chapter"]];
NotebookWrite[nb,
Cell[DateString[{"DayName", ", ", "MonthName", " ", "Day", ", ",
"Year",
" ", "Hour12Short", ":", "Minute", " ", "AMPM"}], "Text"]];
NotebookWrite[nb, Cell["INSTRUCTIONS", "Text"]];
NotebookWrite[nb, Cell["", "Text"]];
(*Exam questions to go here*)
NotebookWrite[nb,
Cell[BoxData[ToBoxes[Array[a, {5, 6}]]], "Print"], After]
CDFDeploy["/myPath/Prototype Exam.cdf", nb]
NotebookClose[nb];
I need advice on styling the CDFs. The CDF file that is produced by CreateDocument and CDFDeploy uses the default stylesheet. (1) How can I make the CDF adopt the cell styling or stylesheet of the notebook that I am using to create the CDFs? I know I can wrap each output cell in Style but that is a pain. (2) How can I set an option in the CDF so that all output is displayed in TraditionalForm? The default output is standardForm. (3) Is there some way to disable the Print menu item and Print button that appears in the CDF when opened in Wolfram Player? I posted this last question some time ago, and the response was that there isn't, but I am asking again just in case the most recent version of Mathematica includes that capability.
Regards,
Greg