8
$\begingroup$

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?

$\endgroup$
4
  • $\begingroup$ there may be sufficient information here (mathematica.stackexchange.com/questions/7458/…) to help you out. $\endgroup$ Commented 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$
    – Verbeia
    Commented 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$ Commented Oct 15, 2012 at 21:40
  • $\begingroup$ Marek, please consider posting that solution as an answer to your own question. $\endgroup$
    – Mr.Wizard
    Commented Oct 16, 2012 at 15:35

1 Answer 1

8
$\begingroup$

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.

$\endgroup$
2
  • $\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$
    – TheDoctor
    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$
    – Kuba
    Commented May 9, 2015 at 0:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.