I use beamer slides to make flashcards for myself when learning new subjects. I would like to randomize the order in which the slides are presented (which helps me to memorize).

Is there an easy way to do this in beamer? Or maybe there is a package available?

There seem to be few flashcard document classes available, but these seem to have been designed so that one prints out the flashcards, and hence there is no "randomize" or "shuffle" option. I don't want to print the flashcards out. I just want to look at them on a screen.

Thanks in advance for any help and suggestions!

  • Can you show us, how you create the flashcarts? It might be easier to randomize the words being placed on the cards. – samcarter_is_at_topanswers.xyz Jul 31 '16 at 17:22
  • Just to get a few side conditions: Should the order of frames be random or should the order just be shuffled (each card appearing exactly once, no more, no less)? – samcarter_is_at_topanswers.xyz Jul 31 '16 at 17:26
  • Using Linux (or similar) you can produce the pdf in fixed order in LaTeX and then shuffle the pages randomly as many times as you like, see, e.g., unix.stackexchange.com/questions/209637/… – Marijn Jul 31 '16 at 22:25
  • It would be nice to know, if it's just single frame to be shuffled of if two frames with Q&A should stay in consecutive order. – samcarter_is_at_topanswers.xyz Aug 1 '16 at 8:25

Based on How do I generate in LaTeX a list of random questions avoiding repetitions? and still very hacky.

The first slide will show the word in one language, on the next slide a translation in another language is added.


    \pgfmath@ifundefined{pgfmath@randomlist@#2}{\pgfmath@error{Unknown random list `#2'}}{%
        \edef\pgfmath@randomlistlength{\csname pgfmath@randomlist@#2\endcsname}%
            \expandafter\expandafter\expandafter\pgfmath@marshal\expandafter\expandafter\expandafter{\csname pgfmath@randomlist@#2@\pgfmath@randomtemp\endcsname}%
            % Now prune.
            \advance\c@pgfmath@countb by1\relax%
                \def\pgfmath@marshal{\expandafter\global\expandafter\let\csname pgfmath@randomlist@#2@\the\c@pgfmath@counta\endcsname=}%
                \expandafter\pgfmath@marshal\csname pgfmath@randomlist@#2@\the\c@pgfmath@countb\endcsname%
                \advance\c@pgfmath@counta by1\relax%
                \advance\c@pgfmath@countb by1\relax%
            \advance\c@pgfmath@counta by-1\relax%
            \expandafter\xdef\csname pgfmath@randomlist@#2\endcsname{\the\c@pgfmath@counta}%        
            \pgfmath@error{Random list `#2' is empty}%

    \pgfmath@ifundefined{pgfmath@randomlist@#2}{\pgfmath@error{Unknown random list `#2'}}{%
        \edef\pgfmath@randomlistlength{\csname pgfmath@randomlist@#2\endcsname}%
            \def\pgfmath@marshal{\expandafter\global\expandafter\let\csname pgfmath@randomlist@#1@\pgfmathcounter\endcsname=}%
            \expandafter\pgfmath@marshal\csname pgfmath@randomlist@#2@\pgfmathcounter\endcsname%
        \expandafter\xdef\csname pgfmath@randomlist@#1\endcsname{\pgfmath@randomlistlength}%

\pgfmathsetseed{\number\pdfrandomseed} % seed for random generator

 {Canard \textcolor<1>{white}{Duck} }%
 {Poisson \textcolor<1>{white}{Fish} }%    
 {Chat \textcolor<1>{white}{Cat} }%          


\foreach \QuizNumber in {1,...,\NumberOfQuizes} {%





enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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