Skip to content

Commit 876255b

Browse files
committed
[docs] remove reference to old shortcuts from exercise[2] [skip CI]
1 parent 3f6928a commit 876255b

File tree

2 files changed

+44
-18
lines changed

2 files changed

+44
-18
lines changed

src/jupyter_contrib_nbextensions/nbextensions/exercise/readme.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ enabled.
1010
The example below demonstrates some of the features of the exercise extensions.
1111

1212
- First, an solution or "details" cell is created by (a) selecting two cells with the rubberband and (b) clicking on the menu-button [exercise extension]
13-
- Second, the two next cells are selected using the keyboard shortcut Shift-J and a solution is created using the shortcut Alt-D [exercise2 extension]
13+
- Second, the two next cells are selected using a keyboard shortcut, and a solution is created using the shortcut Alt-D [exercise2 extension]
1414
- Third, the two solutions are expanded by clicking on the corresponding widgets
1515
- Fourth, the solutions are removed by selecting them and clicking on the buttons in the toolbar.
1616

@@ -23,18 +23,30 @@ The extensions provide
2323
- a menubar button
2424
- a cell widget -- A plus/minus button in `exercise` and a sliding checkbox in `exercise2`.
2525

26-
The menubar button is devoted to the creation or removing of the solution. The solution consists in several consecutive cells that can be selected either by multicell selection (*Shift-J* (select next) or *Shift-K* (select previous) keyboard shortcuts --
27-
*Shift-up* and *Shift-down* will probably work in a near future) or using the rubberband extension.
26+
The menubar button is devoted to the creation or removing of the solution. The solution consists in several consecutive cells that can be selected by the usual notebook multicell selection methods (e.g. *Shift-down* (select next) or *Shift-up* (select previous) keyboard shortcuts, or using the rubberband extension.
27+
28+
29+
### Creating a solution
2830

29-
**Creating a solution **
3031
Several cells being selected, pressing the menubar button adds a `cell widget` and hides the cells excepted the first one which serves as a heading cell. *Do not forget to keep the Shift key pressed down while clicking on the menu button
3132
(otherwise selected cells will be lost)*. It is also possible to use a keyboard shortcut for creating the solution from selected cells: Alt-S for exercise extension and Alt-D for exercise2.
3233

33-
**Removing a solution** If a solution heading (first) cell is selected, then clicking the menu bar button removes this solution and its solutions cells are shown. Using the keyboard shortcut has the same effect.
3434

35-
**Showing/hiding solution** At creation of the solution, the solution cells are hidden. Clicking the `cell widget` toggles the hidden/shown state of the solution.
35+
### Removing a solution
36+
37+
If a solution heading (first) cell is selected, then clicking the menu bar button removes this solution and its solutions cells are shown. Using the keyboard shortcut has the same effect.
38+
39+
40+
### Showing/hiding solution
41+
42+
At creation of the solution, the solution cells are hidden. Clicking the `cell widget` toggles the hidden/shown state of the solution.
43+
44+
45+
### Persistence
46+
47+
The state of solutions, hidden or shown, is preserved and automatically restored at startup and on reload.
3648

37-
**Persistence** The state of solutions, hidden or shown, is preserved and automatically restored at startup and on reload.
3849

39-
**Internals** exercise and exercise2 add respectively a solution and solution2 metadata to solution cells, with for value the current state hidden/shown of the solution. For exercise, a div with the plus/minus character is prepended to the solution heading cell. For exercise2, a flex-wrap style is added to the solution heading cell and a checkbox widget, with some css styling, is appended to the cell.
50+
### Internals
4051

52+
exercise and exercise2 add respectively a solution and solution2 metadata to solution cells, with for value the current state hidden/shown of the solution. For exercise, a div with the plus/minus character is prepended to the solution heading cell. For exercise2, a flex-wrap style is added to the solution heading cell and a checkbox widget, with some css styling, is appended to the cell. A solution[.2]_first metadada is also added to enable an easy detection of the first cell in an "exercise" and then allow several consecutive exercises.
Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Exercise2 extensions
1+
Exercise2
2+
=========
23

34
These are two extensions for Jupyter, for hiding/showing solutions cells.
45
They use the same approach and codebase and differ only by the type of
@@ -9,30 +10,43 @@ enabled.
910
The example below demonstrates some of the features of the exercise extensions.
1011

1112
- First, an solution or "details" cell is created by (a) selecting two cells with the rubberband and (b) clicking on the menu-button [exercise extension]
12-
- Second, the two next cells are selected using the keyboard shortcut Shift-J and a solution is created using the shortcut Alt-D [exercise2 extension]
13+
- Second, the two next cells are selected using a keyboard shortcut, and a solution is created using the shortcut Alt-D [exercise2 extension]
1314
- Third, the two solutions are expanded by clicking on the corresponding widgets
1415
- Fourth, the solutions are removed by selecting them and clicking on the buttons in the toolbar.
1516

1617
![](image.gif)
1718

1819

19-
## The extensions provide
20+
The extensions provide
21+
----------------------
2022

2123
- a menubar button
2224
- a cell widget -- A plus/minus button in `exercise` and a sliding checkbox in `exercise2`.
2325

24-
The menubar button is devoted to the creation or removing of the solution. The solution consists in several consecutive cells that can be selected either by multicell selection (*Shift-J* (select next) or *Shift-K* (select previous) keyboard shortcuts --
25-
*Shift-up* and *Shift-down* will probably work in a near future) or using the rubberband extension.
26+
The menubar button is devoted to the creation or removing of the solution. The solution consists in several consecutive cells that can be selected by the usual notebook multicell selection methods (e.g. *Shift-down* (select next) or *Shift-up* (select previous) keyboard shortcuts, or using the rubberband extension.
27+
28+
29+
### Creating a solution
2630

27-
**Creating a solution **
2831
Several cells being selected, pressing the menubar button adds a `cell widget` and hides the cells excepted the first one which serves as a heading cell. *Do not forget to keep the Shift key pressed down while clicking on the menu button
2932
(otherwise selected cells will be lost)*. It is also possible to use a keyboard shortcut for creating the solution from selected cells: Alt-S for exercise extension and Alt-D for exercise2.
3033

31-
**Removing a solution** If a solution heading (first) cell is selected, then clicking the menu bar button removes this solution and its solutions cells are shown. Using the keyboard shortcut has the same effect.
3234

33-
**Showing/hiding solution** At creation of the solution, the solution cells are hidden. Clicking the `cell widget` toggles the hidden/shown state of the solution.
35+
### Removing a solution
36+
37+
If a solution heading (first) cell is selected, then clicking the menu bar button removes this solution and its solutions cells are shown. Using the keyboard shortcut has the same effect.
38+
39+
40+
### Showing/hiding solution
41+
42+
At creation of the solution, the solution cells are hidden. Clicking the `cell widget` toggles the hidden/shown state of the solution.
43+
44+
45+
### Persistence
46+
47+
The state of solutions, hidden or shown, is preserved and automatically restored at startup and on reload.
3448

35-
**Persistence** The state of solutions, hidden or shown, is preserved and automatically restored at startup and on reload.
3649

37-
**Internals** exercise and exercise2 add respectively a solution and solution2 metadata to solution cells, with for value the current state hidden/shown of the solution. For exercise, a div with the plus/minus character is prepended to the solution heading cell. For exercise2, a flex-wrap style is added to the solution heading cell and a checkbox widget, with some css styling, is appended to the cell. A solution[.2]_first metadada is also added to enable an easy detection of the first cell in an "exercise" and then allow several consecutive exercises.
50+
### Internals
3851

52+
exercise and exercise2 add respectively a solution and solution2 metadata to solution cells, with for value the current state hidden/shown of the solution. For exercise, a div with the plus/minus character is prepended to the solution heading cell. For exercise2, a flex-wrap style is added to the solution heading cell and a checkbox widget, with some css styling, is appended to the cell. A solution[.2]_first metadada is also added to enable an easy detection of the first cell in an "exercise" and then allow several consecutive exercises.

0 commit comments

Comments
 (0)