This is a follow-up question to Clever beamer animation? Writing a script that changes a tikz picture in beamer?
as suggested there, I will put a bounty on this one.
What I seek is a set of macros, perhaps a package for a scripting language for beamer/tikz animations.
I proceed carefully here, since I am not sure whether some of the concrete requests and suggestions are possible as is. At the same time, I do not wish to hinder the resourcefulness of whoever tries to respond here. I am also aware that I might be asking for the wrong set of features: things that are not really needed, and missing real useful features.
And of course, I would not expect any "full" solution; I would be infinitely grateful even if a small part of this "plan" is implemented.
So, please take whatever follows as a very very initial draft, and feel free to change.
The desired set of features, revolves around three ingredients: role, action(or "say"), and script. Each graphical element can take several roles, and can associate with each of these a default "action".
The concrete visualization problem that lead me to this question is related to the simulation of the execution of a flow chart.
First I define the notion of a "role", which is something that can take the place of a tikz definition. So, if "role" is a non-terminal symbol in an EBNF, I would like to be able to write "
Concrete syntax is:
role -> 'r' opCode nameSayList
opCode -> '=' //Resets the roles list
'+=' // Add to the roles list
'-=' // Remove items from the role list (not sure it is needed)
nameSayList -> singleSay
'{' singleSay, ... '}'
singleSay -> roleName
roleName '/' keyList
roleName -> Any unique identifier, with whichever syntax
keyList -> singleKey
'{' manyKeys '}'
singleKey -> any pgf key
manyKeys -> any list of pgf keys with their assignments
Semantics of the above specification: for each graphical element (which may be even a scope) the package computes a set of pairs. The first element of each pair is a "role name", and the second, and optional element, is a list of pgf key assignments.
Now, a script can be specified with the following:
script -> \script{ Stages } picture
picture -> \begin{tikzpicture} ... \end{tikzpicture}
stages -> stage, ...
stage -> singleActivation
'{' singleAction, ... '}'
singleActivation -> role
role/says
says -> singleSay
'{' singleSay, .... '}'
singleSay -> key [= value]
This model does not include the "fadeOut" and the "introduction" of a graphical element, by which such an element with a role is activated with specific key setting in the stage before (or after) its designated stage.
To demonstrate, think of a flow-chart diagram.
Each node belong in a class: decision, IO, process, etc. You can run a script on the diagram that would highlight all the nodes of a certain class as the speaker speaks about the different kinds of components.
Or, you can run a simulation, in which edges and nodes are highlighted, as the flowchart progresses through the computation. A stage including several roles could be used for highlighting the current input, current output, etc.
(Feel free to use a "Turing Machine" or "Finite State Automaton" if you dislike flowcharts as much as I do.)
'

animatepackage (http://ctan.org/pkg/animate) and itstimelineoption, but that's another story, I'm afraid... – Malipivo Mar 29 '14 at 15:33