2

I would like to to use beamer a bit like this:

  • have some words replaced by a red underline in the main text;
  • those words should appear one by one, slide by slide;
  • a randomized list of those hidden words should appear at the bottom of those frames and one the corresponding word was uncovered in the main text this element of the list should be crossed out;

Of course the whole process should be automated. Below is a proof of concept where slide numbers are inserted by hand...

\documentclass[xcolor=dvipsnames]{beamer}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{soulutf8}
\usepackage[normalem]{ulem}
\usepackage{color}
\usepackage{transparent}

\newcommand\myul{\bgroup\markoverwith
  {\textcolor{red}{\rule[-0.6ex]{.1pt}{0.3ex}}}\ULon}
% \newcommand\myul{\bgroup\markoverwith
% {\textcolor{white}{\rule[-0.3ex]{2pt}{1.0pt}}}\ULon}
\newcommand<>{\myvisible}[1]{%
  \alt#2{%
    #1%
  }{%
    \myul{\textcolor{bg}{#1}}%
  }}
\newcommand<>{\myterm}[1]{%
  \alt#2{\st{#1}%
  }{%
    {#1}%
  }}

\begin{document}
\begin{frame}[<+->]
  \only<+->{}%
  \myvisible<+->{François Mitterrand} was President of France from
  1981 to 1995. While \myvisible<+->{Jacques Chirac} was President of
  France from 1995 to 2007.
  \vfill
  Termes: \myterm<2->{François Mitterrand}, \myterm<3->{Jacques Chirac}.
\end{frame}
\end{document}

Of course the line Termes:

\myterm<2->{François Mitterrand}, \myterm<3->{Jacques Chirac}

should be added automatically.

Stefan Pinnow
  • 29,535
brained
  • 21
  • Maybe http://tex.stackexchange.com/a/48944/36296 is worth a look? But I have no idea what this package is able to do. – samcarter_is_at_topanswers.xyz Nov 07 '16 at 09:48
  • not answering the question, but you might want to use \myul{\phantom{#1}}% instead of \myul{\textcolor{bg}{#1}}%, otherwise one sees the descents of the letters in white on top of the line and could guess the words based on the number and position of the descents (but the words could be guessed anyway, as one simply can order the possible answers by length). – samcarter_is_at_topanswers.xyz Nov 07 '16 at 14:36

0 Answers0