DocOnce has good support for creating slides. Especially if you have ordinary DocOnce documents with running text, it is an efficient process to strip down this text to a slide format.
Rather than speaking about slides, we think of study guides where the material is presented in a very condensed, effective, summarizing form for overview, use in lectures, and repetition. The slide format is a good way of writing study guides, but by explicitly thinking of study guides the slide format can be made more effective for self-study when overview and repetition are necessary - with a particular emphasis on gaining understanding.
Make it an assumption that the reader of a study guide is also a reader of the underlying running text in the chapter.
For each DoOnce file in the chapter ch2
it can be wise to make a
corresponding study guide file in the subdirectory slides-ch2
.
For example, part1.do.txt
has its counterpart with slides in
slides-ch2/part1.do.txt
. Then there is a file slides_ch2.do.txt
which assembles the parts if slides-ch2
, typically with a content
like
TITLE: Study Guide: Some title
AUTHOR: Author Name Email:somename@someplace.net at Institute One
DATE: today
# #ifdef WITH_TOC
!split
TOC: on
# #endif
# #include "lec-ch2/part1.do.txt"
# #include "lec-ch2/part2.do.txt"
# #include "lec-ch2/part3.do.txt"
The author has the following work flow for generating slides for a
chapter file, say part1.do.txt
.
part1.do.txt
to slides-ch2/part1.do.txt
.slides_ch2.do.txt
and include slides-ch2/part1.do.txt
.ch2.do.txt
file, but sometimes it can
be more natural to have larger parts than sections in the slide
collection.=
, while
each slide has a DocOnce subsection heading with 5 =
.slides-ch2/part1.do.txt
:!split
right above every slide heading!--denumber_all_equations
, or
you can edit the LaTeX math environment manually.
Remember that
references to equations numbers must be removed from the slides too!FORMAT
and
writing MOVIE
for HTML output and just a link in PDF output
might be necessary. See the manual for how to work with movies in DocOnce.
quiz
environment). With quiztools you can extract all such
multiple-choice questions, create online games with Kahoot, and
let the students answer with their smart phones at the beginning of
a lecture.
The scores are visible to all on the main screen and communicate the
preparation level.
I would add a fourth requirement to the list in the previous
section: a study guide should also be available
as an IPython/Jupyter notebook for experimentation, extension, and
personal notes. This is technically
straightforward by just generating a notebook from the slide source,
but a notebook puts some constraints
on code snippets and figures such that it is meaningful to execute
all the code. Moreover, many figures are inlined and appear as a result of
executing code in a notebook. While other formats will show a code
snippet and then the corresponding figure, the notebook can leave
the figure out and let it appear as the code cell is executed.
Technically in DocOnce, this is solved by putting a FIGURE
construction
inside an # #if FORMAT
test (or % if FORMAT
if Mako branches are
preferred). If `FORMAT != 'ipynb``, you have a FIGURE
line, otherwise
the preceding code cell is supposed to generate the figure.
There is a quite general script in doc/src/chapters/make_slides.sh
for
compiling a slide collection defined in a file like slides_ch2.do.txt
.
Just run
Terminal> bash ../make_slides.sh slides_ch2
from the chapter directory. Note that the script will first spell check
the slide files. This is done in the slides-ch2
directory. Errors are
reported in files located in slides-ch2
. To update the chapter's dictionary
for spell checking, you need to do
Terminal> cp slides-ch2/new_dictionary.txt~ .dict4spell
in the ch2
chapter directory.
Similarly, to look at misspellings,
the file slides-ch2/misspellings.txt
is the relevant file.
The make_slides.sh
script compiles a variety of slides:
reveal.js
slides with different colors.deck.js
slides. This format is usually inferior to reveal.js
,
but is also very much personal taste.theme=red_shadow
line in make_slides.sh
to control the Beamer theme.Since DocOnce documents can be translated to IPython/Jupyter notebooks, hereafter just called notebooks, it is tempting to produce a version of the teaching material also in notebook form. This author's experience is that a more traditional book format with running text is not so ideal for a notebook:
% if FORMAT != 'ipynb':
followed by a FIGURE:
line
that includes the resulting figure for all formats except the notebook.
Also be aware of the DocOnce hidden code environment that can
be used to declare code blocks that appear in notebooks (because they
are needed) but not in other formats: !bc pyhid
gives a Python
hidden snippet.
Using notebooks as a starting point for a traditional textbook might be a good idea, but will enforce a non-conventional style in the textbook. For example, notebooks should be quite small, leading to similarly small modules in the book. Notebooks use cross-referencing to little extent, and this will be reflected in the textbook too. Notebooks also need more code to run, so one has to accept more code in the textbook. However, there is still a problem for the notebook with defining items for an index, fancy admonitions, and other elements that one would desire in a textbook. More experience is needed to make best practices. Since notebooks can be compiled in Markdown, and DocOnce can read basic Markdown input, it is possible to go from the notebook format to DocOnce, but this is not tested.