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 a simple tabs and incremental environment.

Caution: If a tabs environment contains only one tab, then only the text in the tab is shown.
Also be aware that a tabs environment within another tabs environment is not supported.

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{genericGWTVisualization}[100prc][600]{gwtviz}
...
\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{genericGWTVisualization}