You're not reading the latest revision of this page, which is here.

JSX Visualization Tabs and Incremental

To support exercises (where you can ask the user to solve certain problems
and then check the solution), you can use simple tabs and incremental environments.

Caution: Using canvases within the tabs environment doesn't work properly.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
\begin{genericJSXVisualization}{jsxviz}
...
\text{Solve the following problems and then click on Answer}
\text{a) Calculate something}
\text{b) Calculate something else}
\text{c) Calculate something else again}
 
 
\begin{tabs}{0}% tabs environment, the second argument defines which tab should be displayed on default, 0 means all tabs are hidden
  \tab{Answer}
  \text{\textbf{a)result for a}
  \text{\textbf{b)result for b}
  \text{\textbf{c)result for c}
 
  \tab{Solution for a}
 
  \begin{incremental}{1} % incremental environment, step 1 is displayed on default
    \step %creates a step
    \text{line 1 in step1}
    \text{line 2 in step1}
    % more lines ...
 
    \step % begin step 2
    \text{line 1 in step2}
    % more lines ...
  \end{incremental}
 
  \tab{Solution for b}
    ...
  \tab{Solution for c}
  ...
\end{tabs}
...
\end{genericJSXVisualization}