Updates to Presenter Tools

Kevin Daily, Wolfram Research

(RowDefault[, (Spacer1), , (Spacer1), ])  #WolframTechConf

ABSTRACT

Learn about how we’ve been improving Presenter Tools. We’ll discuss our updated strategy for what-you-see-is-what-you-get, the modernization of the paclet layout, an improved encapsulation of presentation environments, and a preview of future design directions. We welcome feedback on features you’d like to see.

A brief tour of Presenter Tools

Authoring toolbar

Presentation modes

Themes

Magnification

Starting in 14.2, the presenter notebook’s magnification scales with the window width.

Dynamic[AbsoluteCurrentValue[EvaluationNotebook[],Magnification]]

Button["Reset Magnification",CurrentValue[EvaluationNotebook[],Magnification]=Inherited;
CurrentValue[EvaluationNotebook[],StyleHints]=Inherited]

Magnification: what-you-see-is-what-you-get

More complicated interfaces should look as intended.

Manipulate[Plot[Sin[a x+b],{x,0,2 π}],{a,1,10},{b,0,π}]

Audio[File["ExampleData/car.mp3"]]

SparseArray[{{1,1}->1,{2,2}->2,{3,3}->3,{1,3}->4}]

Magnification: implementation

Stylesheets, StyleHints, and inheritance.

AbsoluteCurrentValue[{StyleDefinitions,{"Notebook","Slideshow Working"},Magnification}]//InputForm

AbsoluteCurrentValue[{StyleDefinitions,{"Notebook","Slideshow Working"},StyleHints}]

Magnification: scale factor

It was arbitrary but scaling to the input/output font size was reasonable.

Grid[{Style[#,Bold]&/@{"Mode","Input/Output FontSize"},{"Presentation", HoldForm[0.019*AbsoluteCurrentValue[{WindowSize,1}]]},{"Working",13}},Alignment->Left,Spacings->{2,0.5}]

0.019/13

Magnification: converting from old to new

The WFR entry ConvertLegacyPresenterStylesheet performs the conversion automatically.

Needs["Wolfram`StylesheetTools`"]
path=StylesheetPathFind["PresenterTools/WTC2017.nb"];

CreateDocument[{TextCell["Section","Section"],ExpressionCell[Dynamic[CurrentValue[{StyleDefinitions,"Section",CellMargins}],UpdateInterval->1],"Output"]},StyleDefinitions->Get@path,ScreenStyleEnvironment->"Slideshow Working",WindowToolbars->{}]

Encapsulation

Presentations define three style environments

“Slideshow Working”

“Slideshow Presentation”

“Scrolling Presentation”

How do we gain access to these presenter environments?

CreateNotebook

CreateNotebook[{"Presenter","Garnet"}];

CreateNotebook["WolframAlpha"];

CreateNotebook[{"WolframAlpha","Presenter"}];

(Bonus) Add PresenterToolsCore.nb to private stylesheet

Method 1: verbose replacement

SetOptions[EvaluationNotebook[],StyleDefinitions->Replace[CurrentValue[EvaluationNotebook[],StyleDefinitions],{
s_String:>Notebook[{Cell[StyleData[StyleDefinitions->s]],Cell[StyleData[StyleDefinitions->FrontEnd`FileName[{"PresenterTools"},"PresenterToolsCore.nb"]]]},StyleDefinitions->"PrivateStylesheetFormatting.nb"],
Notebook[cells:{__Cell},opts___]:>Notebook[Join[Cases[cells,Cell[StyleData[StyleDefinitions->Except[FrontEnd`FileName[{"PresenterTools"},___]],___],___]],{Cell[StyleData[StyleDefinitions->FrontEnd`FileName[{"PresenterTools"},"PresenterToolsCore.nb"]]]},DeleteCases[cells,Cell[StyleData[StyleDefinitions->_,___],___]]],opts]}]]

Method 2: StylesheetTools paclet

PacletInstall["Wolfram/StylesheetTools"]

Needs["Wolfram`StylesheetTools`"]

With[{sd=CurrentValue[EvaluationNotebook[],StyleDefinitions]},
If[StringQ[sd],SetOptions[EvaluationNotebook[],StyleDefinitions->Notebook[{Cell[StyleData[StyleDefinitions->sd]]},StyleDefinitions->"PrivateStylesheetFormatting.nb"]];
StylesheetRebase[EvaluationNotebook[],{sd,"PresenterTools/PresenterToolsCore.nb"},OverwriteTarget->True,"CorrectDifferences"->False]]]

Modern paclet layout

SystemOpen[PacletObject["PresenterTools"]["Location"]]

$InstallationDirectory

Upcoming features: toolbar

This uses the same technology as the default toolbar:

Upcoming features: automatic scaling

If a cell is too wide, then the graphic is fitted to the window width:

If a cell is too tall, then the graphic is fitted to the window height:

Related Sessions

Today, 3:00 PM - 4:00PM, Office Hour: Notebook Front End