1

I'm making a beamer presentation that involves a lot of arrays. I want to be able to put an array on one slide; then as I progress through the frame I want to be able to make some parts of the array bold/put them in boxes, etc; step by step.

Currently I have multiple arrays on one frame and am uncovering each on in turn. However this does not keep the image in the same place. Ideally I'd like to be able to superimpose (or overlay) the images so I can reveal some numbers in the array becoming bold, etc.

How do I go about this?

  • Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user36296 Mar 20 '17 at 20:00
  • And please tell precisely what you want to uncover, make bold etc. – user36296 Mar 20 '17 at 20:00
  • Perhaps this answer to a related question might help: tex.stackexchange.com/a/64295/127845 – franziska Mar 20 '17 at 20:44
1

You can use a number of different overlay specification macros to alternative between what's displayed on a slide. Below I've used \only<num>{<stuff>}:

enter image description here

\documentclass{beamer}

\usepackage{eqparbox}

\begin{document}

% Original unaltered frame
\begin{frame}
  Original unaltered frame:
  \[
    \left[
      \begin{array}{*{4}{c}}
        a & b & c & d \\
        1 & 2 & 3 & 4 \\
        e & f & g & h \\
        5 & 6 & 7 & 8
      \end{array}
    \right]
  \]
\end{frame}

% Updated frame with slide-variations
\begin{frame}
  Updated frame with slide-variations:
  \[
    \left[
      \begin{array}{*{4}{c}}
        a & b & c & d \\
        1 & 2 & 3 & 4 \\
        e & f &
          \only<1>{\eqmakebox[var]{$g$}}
          \only<2>{\eqmakebox[var]{$\mathbf{g}$}}
          \only<3>{\smash{\eqmakebox[var]{\fbox{$g$}}}} & h \\
        5 & 6 & 7 & 8
      \end{array}
    \right]
  \]
\end{frame}

\end{document}

I've also incorporated the use of eqparbox that sets its contents in a box of similar width based on a \eqmakebox[<tag>]. Since your content may differ in size (width and/or height) from one slide to the next (by adding \fbox or \mathbf or whatever), this might be useful.

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.