[Date Index]
[Thread Index]
[Author Index]
Re: Re: Creating a Banner -> Now creating a slide show
*To*: mathgroup at smc.vnet.net
*Subject*: [mg93817] Re: [mg93729] Re: Creating a Banner -> Now creating a slide show
*From*: Syd Geraghty <sydgeraghty at me.com>
*Date*: Wed, 26 Nov 2008 05:15:59 -0500 (EST)
*References*: <gg8pb7$ju0$1@smc.vnet.net> <200811240913.EAA00877@smc.vnet.net>
David et al,
Below is my tweak to code from this thread which creates a Slide Show
notebook with a docked banner, two slide pages
which include the "End Slide" code from the Mathematica V7 Writing Assistant
palette.
I would be interested to know if there is a better way to code this.
I tried and failed to locate any Documentation to help
understand the options for FEPrivate`FrontEndResource below ( which
was part of the first thread I followed that worked):-
DockedCells -> {FEPrivate`FrontEndResource["FEExpressions",
"SlideshowToolbar"],
First[ToBoxes[TextCell[Row[{tbl,
rose}], "Text", TextAlignment -> Right]]]}
My tweaked code follows:-
rose = Import["ExampleData/rose.gif"];
tbl = Grid[{{Style["First"], Style["Second"]}, {Style["Third"],
Style["Fourth"]}}, Dividers -> Directive[Black, Thickness[2]],
ItemSize -> {8, 1}];
(* This specifies cells that will be shown in the slides
Initially I had to use the V7 Writing Assistant Palette to insert
"Start Slide" & "End Slide" appropriately.
However I hacked the "Writing Assistant" palette using the "Generate \
Notebook From Palette" option, copying as input text the "Writing and \
Formatting" output cell, pasting it as text and found a cell that \
inserted the "End Slide".
That is called endlinecell below *)
headercell =
TextCell["", "SlideShowNavigationBar",
CellTags -> "SlideShowHeader"];
endlinecell = Cell[
TextData[{
ButtonBox[
"\[FilledLeftTriangle]\[ThickSpace]\[ThickSpace]\
\[ThickSpace]", BaseStyle -> "SlidePreviousNextLink",
Appearance -> {Automatic, None},
ButtonFunction :>
FrontEndExecute[{
FrontEndToken[
FrontEnd`ButtonNotebook[],
"ScrollPagePrevious"]}], ButtonNote ->
FEPrivate`FrontEndResource[
"FEStrings", "SlideshowPrevSlideText"]],
"\[ThickSpace]\[ThickSpace]|\[ThickSpace]\[ThickSpace]\
",
ButtonBox[
"\[ThickSpace]\[ThickSpace]\[ThickSpace]\
\[FilledRightTriangle]", BaseStyle -> "SlidePreviousNextLink",
Appearance -> {Automatic, None},
ButtonFunction :>
FrontEndExecute[{
FrontEndToken[
FrontEnd`ButtonNotebook[],
"ScrollPageNext"]}],
ButtonNote ->
FEPrivate`FrontEndResource[
"FEStrings", "SlideshowNextSlideText"]]}],
"PreviousNext"];
title1 = TextCell["The first demonstration", "Section"];
textCell1 =
TextCell["A first dummy example", Blue, 25, "Text",
TextAlignment -> Center];
demoCell1 =
Manipulate[
Plot[x^a*Exp[-x], {x, 0, 2}, PlotRange -> {{0, 2}, {0, 1}}], {a, 0,
3}];
title2 = TextCell["The second demonstration", "Section"];
textCell2 =
TextCell["The second dummy example", Blue, 25, "Text",
TextAlignment -> Center];
demoCell2 =
Panel[Animate[
PolarPlot[Sin[b*\[Phi]], {\[Phi], 0, 2 \[Pi]},
PlotRange -> 1], {b, 0, 4}]];
(*This opens a Slide Show with the banner consisting of a table and a \
picture*)
slideshow =
CreateDocument[{headercell, title1, textCell1, demoCell1,
endlinecell, headercell, title2, textCell2, demoCell2,
endlinecell}, ScreenStyleEnvironment -> "SlideShow",
WindowSize -> {800, 800}, WindowTitle -> "Banner & Slide Show 2"];
SetOptions[slideshow,
DockedCells -> {FEPrivate`FrontEndResource["FEExpressions",
"SlideshowToolbar"],
First[ToBoxes[
TextCell[Row[{tbl, rose}], "Text", TextAlignment -> Right]]]}]
(* THIS GENERATES THE DESIRED SLIDE SHOW NOTEBOOK!!! *)
Of course V7 does offer a really nice interactive way to generate
Slide Shows from notebooks as seen in:-
http://www.wolfram.com/broadcast/screencasts/presentingnotebooks/
Your ideas are very nice but using them requires a special knowledge
of undocumented functions.
Cheers ... Syd
PS Does anyone know how to search Mathematica Package contents using
Spotlight on Mac OSX?
Syd Geraghty B.Sc, M.Sc.
sydgeraghty at mac.com
Mathematica 7.0.0 for Mac OS X x86 (64 - bit) (21st November, 2008)
MacOS X V 10.5.4
MacBook Pro 2.33 Ghz Intel Core 2 Duo 2GB RAM
On Nov 24, 2008, at 1:13 AM, David Reiss wrote:
> Hi Alexei,
>
> The following should do what you want, if I am understanding the
> question:
>
>
> cells = Join[{TextCell["", "SlideShowNavigationBar",
> CellTags -> "SlideShowHeader"]},
> Riffle[{CellGroup[{title1, textCell1, demoCell1}],
> CellGroup[{title2, textCell2, demoCell2}]},
> TextCell["", "SlideShowNavigationBar",
> CellTags -> "SlideShowHeader"]]
> ];
>
> nb = CreateDocument[cells, WindowSize -> {900, 900},
> ScreenStyleEnvironment -> "SlideShow"];
>
>
>
> The cell, TextCell["", "SlideShowNavigationBar", CellTags ->
> "SlideShowHeader"]] is what tells where slides are separated from one
> another, so I just insert it between the cellgroups using Riffle, and
> I make sure that there is also a copy at the beginning of the
> notebook. Then in the final document I set the notebook option
> ScreenStyleEnvironment -> "SlideShow" to make the slideshow explicit.
> I removed the 1 from the last argument of your Cellgroups so that the
> groups are open. In a slide show, the cellbrackets are often not
> visible, so you'd want the cellgroups to all be open,... otherwise
> you night not realize that the slide has content... alternatively
> you could put groupopeners on all cells...
>
> Best,
>
> David
>
>
>
>
> On Nov 22, 6:10 am, Alexei Boulbitch <Alexei.Boulbi... at iee.lu> wrote:
>> Dear David,
>>
>> thank you for your answers. The article you mentioned appeared to be
>> very instructive and helpful. With it I seem to understand now, how
>> one
>> can make a presentation in one notebook and show it in another one.
>> Still, I have one question, may be you could give a tip.
>>
>> Dear MathGroup members, this this question I address of coarse, to
>> anyone of you. This group of questions - I believe - represents a
>> general interest, since it solves an important problem of how to
>> organize a Mathematica-based presentation with a lot of programming
>> behind, if you want to show only results, but not the "kitchen". The
>> answer (at least one possible answer) seems to be straightforward:
>> separate them. In other words, put programming into one notebook and
>> open from this another one which is "clean", since it contains only
>> your
>> presentation to show. This however, requires a bit of a notebook
>> programming.
>>
>> OK, below I write a simple code which creates a model of notebook
>> to be
>> presented. It consists of two groups of cells, each one containing a
>> title, an explanatory text and an interactive or animated
>> presentation.
>> This works. Playing with this and using tips fromhttp://scientificarts.co
>> =
> m/worklife/notebooks/and from Mathematica
>> tutorials one may create a variety of other separated presentations.
>>
>> Now comes my question. Do you know a way to programmatically instruct
>> Mathematica that the newly created notebook must open already as a
>> SlideShow and each of these cell groups must be shown in a separate
>> slide=
> ?
>> To explain the importance of this point: if it works, you can open
>> your
>> second (presentation) notebook from your first one just few seconds
>> before the presentation. Otherwise you will need just before your
>> presentation to spend time on dividing it into slides.
>>
>> (* This specify cells that will be shown in the first... *)
>>
>> title1 = TextCell["The first demonstration", "Section"];
>> textCell1 =
>> TextCell["A first dummy example", Blue, 25, "Text",
>> TextAlignment -> Center];
>> demoCell1 =
>> Manipulate[
>> Plot[x^a*Exp[-x], {x, 0, 2}, PlotRange -> {{0, 2}, {0, 1}}], {a, 0=
> ,
>> 3}];
>>
>> (* ... and the second group *)
>> title2 = TextCell["The second demonstration", "Section"];
>> textCell2 =
>> TextCell["The second dummy example", Blue, 25, "Text",
>> TextAlignment -> Center];
>> demoCell2 =
>> Animate[PolarPlot[Sin[b*\[Phi]], {\[Phi], 0, 2 \[Pi]},
>> PlotRange -> 1], {b, 0, 4}, Paneled -> False];
>>
>> (* This creates the notebook *)
>>
>> nb = CreateDocument[{
>> CellGroup[{title1, textCell1, demoCell1}, =
> 1],
>>
>> CellGroup[{title2, textCell2, demoCell2}, 1]
>> =
> },
>>
>> WindowSize -> {900, 900}];
>>
>> Best, Alexei
>>
>> Hi Alexi,
>>
>> There are two (or more!) ways to go about this. One is to create a
>> cell in a notebook that has the form that you want. Then use the
>> Cell>Show Expression menu command to get the actual Cell expression
>> for that cell. Copy that and use that in the DockedCells list.
>>
>> An alternative way to go about this programatically is the following.
>> This involves some trickier stuff, but perhaps you can model based on
>> this. Here it is for the example that you tried:
>>
>> rose = Import["ExampleData/rose.gif"];
>>
>> SetOptions[EvaluationNotebook[],
>> DockedCells -> {
>> FEPrivate`FrontEndResource["FEExpressions",
>> "SlideshowToolbar"],
>> First[
>> ToBoxes[
>> TextCell[rose, "Section", TextAlignment -> Center]
>> ]
>> ]}]
>>
>> This sort of programming approach is not widely known, but I discuss
>> some of it in the article "Every Document is an Expression: The Reach
>> of Mathematica 6"
>>
>> on this page,
>>
>> http://scientificarts.com/worklife/notebooks/
>>
>> Best regards,
>>
>> David
>>
>> On Nov 18, 7:21 am, Alexei Boulbitch <Alexei.Boulbi... at iee.lu>
>> wrote:>=
> Dear David,
>>> This is indeed a very good thing to be able to do. For this reason
>>> I wo=
> ul=
>>
>> d like to ask you to explain more about it.> What I am missing is
>> to be a=
> ble to include an image as a banner cell, rat=
>>
>> her than only a text. I tried the following:
>>
>>
>>
>>
>>
>>> rose = Import["ExampleData/rose.gif"];
>>
>>> SetOptions[EvaluationNotebook[],
>>> DockedCells -> {Cell[Graphics[rose], "Title"]}]
>>
>>> or
>>
>>> SetOptions[EvaluationNotebook[],
>>> DockedCells -> {FEPrivate`FrontEndResource["FEExpressions",
>>> "SlideshowToolbar"],
>>> Cell[rose, "Section", TextAlignment -> Center]}]
>>
>>> but this does not work. Could you please give a tip?
>>
>>> Best, Alexei
>>
>>>> Just a small (but important) update to my previous post on this.
>>>> he=
> re
>>>> is a more useful template for how to go about this since it
>>>> includes
>>>> the slide navigation elements:
>>>> SetOptions[EvaluationNotebook[],
>>
>>>> DockedCells -> {FEPrivate`FrontEndResource["FEExpressions",
>>>> "SlideshowToolbar"],
>>>> Cell["this is it", "Section", TextAlignment -> Center]}]
>>
>>>> Best,
>>>> David
>>
>>> On Nov 16, 7:03 am, RG <gobithaa... at gmail.com> wrote:> Dear
>>> experts,
>>
>>>> I'm trying to make a powerpoint like presentation using
>>>> Mathematica 6=
> , =
>> bu=
>>> t i
>>>> can't find any explaination in documentation on how to create
>>>> banners
>>>> for my presentation. Nice example can be found at:http://library.wolf
>>>> =
> ra=
>> m.=
>>
>>> com/infocenter/Conferences/7002/.
>>
>>>> Thanking you in advance,
>>>> jetro
>>
>> --
>> Alexei Boulbitch, Dr., Habil.
>> Senior Scientist
>>
>> IEE S.A.
>> ZAE Weiergewan
>> 11, rue Edmond Reuter
>> L-5326 Contern
>> Luxembourg
>>
>> Phone: +352 2454 2566
>> Fax: +352 2454 3566
>>
>> Website:www.iee.lu
>>
>> This e-mail may contain trade secrets or privileged, undisclosed or
>> other=
> wise confidential information. If you are not the intended recipient
> and ha=
> ve received this e-mail in error, you are hereby notified that any
> review, =
> copying or distribution of it is strictly prohibited. Please inform
> us imme=
> diately and destroy the original transmittal from your system. Thank
> you fo=
> r your co-operation.
>
>
Prev by Date:
**Re: How to convert a HeavisideTheta to a PieceWise function**
Next by Date:
**A problem in Pi digits as Lattice space filling**
Previous by thread:
**Re: Creating a Banner -> Now creating a slide show**
Next by thread:
**Mathematica 7.0 slow on OS X**
| |