I've been trying to make flash cards to help me memorize some concepts in my technical classes this semester. Since Mathematica's (mathematical) type setting is so superb, I attempted to make flash cards with it.

Some of my attempts:

1) Add group openers to input cells: Go to Format > Edit Stylesheet. Then, if your input cell style isn't already in the stylesheet, click on the 'Choose a style' drop down menu and choose Input. Then, with the Input cell style highlighted, press Ctrl+Shift+E, and append ShowGroupOpener->True to the end of the cell editor. For example, your Input cell might look like this:

Mathematica graphics

After that, press Ctrl+Shift+E again to close the cell editor, and close the stylesheet editor. Your "flash card" should now behave like this:

enter image description here

2) Use Button: For flash cards whose questions are a combination of words and formulas, I use Button (I also chose Grid for its robust customization):

SetAttributes[show, HoldAll];
show[string_String, expression_] :=
     Defer@TraditionalForm@expression}, {Button["Show", 
      Print@TraditionalForm@expression], SpanFromLeft}

show["Calculate", Integrate[1/(x^3 + 1), x]]

Mathematica graphics

One problem with this method is that if you hide the input cells (so that only the output cells containing the buttons are shown in the notebook) using this method, these flash cards behave weirdly: pressing the button again might reveal the input cell, or in subsequent pressing of the buttons, it will print out an answer that is hidden within a cell grouping (try evaluating the above example and pressing the button several times and you'll see). This is probably caused by the groupings of the print cells. Another issue is getting rid of these cells (or hide them), which I can't figure out how to do right now.

This question is supposed to encourage everyone to show your implementations of flash cards in MMA (or improving on my methods), especially ones that have helped you study in the past. Please feel free to post whatever you'd like: small self-contained flash cards, helper functions/manipulates to display flash cards based on users' input, or systematic ways to smartly organize flash cards. Let your creativity fly!

Other ideas might include: asking users to input an answer and returning True or False if the answer is right or wrong, randomizing the display of flash cards, and delaying a flash card if the user answers/guesses correctly on it. Anki is a good reference for good examples of flash card implementation.

  • $\begingroup$ Although interesting, I'm not really sure whether this question fits the format and scope of this site $\endgroup$ Commented Aug 29, 2014 at 4:28
  • 2
    $\begingroup$ Several interfaces are discussed in tutorial/Views. [BTW, that integral seems particularly un-flash-card-worthy. :) ] $\endgroup$
    – Michael E2
    Commented Aug 29, 2014 at 10:32
  • $\begingroup$ @MichaelE2 best comment I've seen in this SE. Thank you! I just lifted the integral straight from the documentation just to show off the traditional form; I probably should have picked a better example. $\endgroup$
    – seismatica
    Commented Aug 30, 2014 at 4:21

1 Answer 1


Why not take advantage of the fantastic on-board tool "Slide Show"?

enter image description here


I'm using "10.0 for Mac OS X x86 (64-bit) (June 29, 2014)"

Slide Show has two Modes. Edit and Presentation. On Menue>Palettes you'll find the Palette

Slide Show

Just use this Palette to Start, Stop, Create ... Setttings. The Screenshot shows a Slide Show file in some (?) kind of Edit Modus.

enter image description here

enter image description here


I've been thinking about your idea and tried another way to work out.

The basic idea is to provide all the Q & A as variables in a cell, and to bring up the questions with q1 ... qn and retrieve the answers with a1 ... an.

enter image description here

enter image description here

The whole thing certainly needs much revision, but I guess you understand the concept. Below the Q & A part. Have fun!

q1 = Text["What is the sum of 1+1?"];
q2 = Text["Sketch sin(x)"];
q3 = Text["Expand (1+x)^3"];
q4 = Text["What is the name of this \[Pi] character?"];
q5 = Text["What is the value of \[Pi] to the 20th digit?"];
q6 = Text["What is the formula for kinetic energy?"];
q7 = Text["Make a Table of the first 10 Squares."];
a1 = 1 + 1;
a2 = Plot[Sin[x], {x, -\[Pi], \[Pi]}];
a3 = Expand[Expand[(1 + x)^3]];
a4 = Text["\[Pi] is Pi"];
a5 = N[Pi, 20];
a6 = FormulaData["KineticEnergy"];
a7 = Table[i^2, {i, 10}];
  • $\begingroup$ That is awesome! How did you get your slide show to display like that? Mine just shows a navigation bar on top (screenshot). $\endgroup$
    – seismatica
    Commented Aug 30, 2014 at 4:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.