I have a notebook with a docked cell displaying a banner with some graphics. When I convert this notebook to the Slide Show the banner is nicely displayed on each slide. But the Navigation Toolbar is not visible, apparently covered by my docked cell. How to display both, the Navigation Toolbar and my graphical banner in the Slide Show?
-
$\begingroup$ there may be sufficient information here (mathematica.stackexchange.com/questions/7458/…) to help you out. $\endgroup$– Mike HoneychurchCommented Oct 14, 2012 at 23:21
-
$\begingroup$ By the way, Marek, welcome to Mathematica.SE! Please consider registering your account so that any upvotes you get on this question are added to those you might get on future questions and answers. That way, over time you will be able to do more on the site (post graphics, edit things, etc). $\endgroup$– VerbeiaCommented Oct 15, 2012 at 2:51
-
$\begingroup$ @Mike thanks! I knew that one can dock a few cells but I could not find how to call for this SlideShowToolbar. Now I have found it! It is given by FEPrivate`FrontEndResource["FEExpressions", "SlideshowToolbar"] So my problem is solved. $\endgroup$– Marek PfutznerCommented Oct 15, 2012 at 21:40
-
$\begingroup$ Marek, please consider posting that solution as an answer to your own question. $\endgroup$– Mr.WizardCommented Oct 16, 2012 at 15:35
1 Answer
Here's a version which uses Inherited
to pull the slide show's docked cell in. Unfortunately, there's a bug when Inherited
references an empty value where it shows some needless whitespace. So this version uses Dynamic to detect the ScreenStyleEnvironment
and switch its behavior accordingly.
With[{mycell = Cell["Boo!", "DockedCell"]},
nb = NotebookCreate[ScreenStyleEnvironment -> "SlideShow",
DockedCells ->
Dynamic[If[
CurrentValue[EvaluationNotebook[], ScreenStyleEnvironment] ===
"SlideShow", {Inherited, mycell}, mycell]]]]
If you want your cell to precede the slideshow's docked cell instead, just flip the order of Inherited
and mycell
in the list. If you switch to the Working environment, then only your cell will show up.
-
$\begingroup$ I note that this bug in Inherited does not appear to be fixed? Also, rather than using nested If's, how could you use Switch instead? All my attempts fail... $\endgroup$ Commented May 6, 2015 at 5:03
-
$\begingroup$ @TheDoctor strange indeed! Also keep in mind that
Dynamic
in this solution is affected by similar bug: mathematica.stackexchange.com/q/61659/5478. :( So it fires everytime you move the window. $\endgroup$– KubaCommented May 9, 2015 at 0:05