Document Classesbeamer | One Block displayed, the other covered

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
nounouuuuu201186
Posts: 36
Joined: Sun May 20, 2012 6:28 am

beamer | One Block displayed, the other covered

Post by nounouuuuu201186 »

Hi all,

I want that when the first block is displayed, the second is gray, and vice versa.

Code: Select all

\begin{frame}[t]{General formalization of haplotyping.}
  \begin{block}{Inputs}
    \begin{itemize}
    \item A \alert{genotype matrix} $G$.
    \item The \alert{rows} of the matrix are \alert{taxa / individuals}.
    \item The \alert{columns} of the matrix are \alert{SNP sites /
        characters}. 
    \end{itemize}
  \end{block}
  \begin{block}{Outputs}
    \begin{itemize}
    \item A \alert{haplotype matrix} $H$.
    \item Pairs of rows in $H$ \alert{explain} the rows of $G$.
    \item The haplotypes in $H$ are \alert{biologically plausible}. 
    \end{itemize}
  \end{block}
\end{frame}
any help?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

beamer | One Block displayed, the other covered

Post by localghost »

For an adequate problem description and in order to avoid guesses and random shots please prepare a minimal example that contains all necessary but only relevant information in form of code. You should keep this in mind for future requests. Otherwise it can happen that you will get no answer to your questions.


Thorsten
nounouuuuu201186
Posts: 36
Joined: Sun May 20, 2012 6:28 am

beamer | One Block displayed, the other covered

Post by nounouuuuu201186 »

Sorry :oops:
I hope the code below is sufficient :

Code: Select all

\documentclass{beamer}
\usepackage[frenchb]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{epsfig,pslatex,colortbl}
\usepackage{graphics}
\usepackage{graphicx}%pour les includegraphics
\usepackage{array}
\usepackage{beamerthemesplit} 
\usepackage{multicol}

\usetheme{PaloAlto}
\usecolortheme{orchid}
\begin{document}
\begin{frame}[t]{General formalization of haplotyping.}
  \begin{block}{Inputs}
    \begin{itemize}
    \item A \alert{genotype matrix} $G$.
    \item The \alert{rows} of the matrix are \alert{taxa / individuals}.
    \item The \alert{columns} of the matrix are \alert{SNP sites /
        characters}. 
    \end{itemize}
  \end{block}
  \begin{block}{Outputs}
    \begin{itemize}
    \item A \alert{haplotype matrix} $H$.
    \item Pairs of rows in $H$ \alert{explain} the rows of $G$.
    \item The haplotypes in $H$ are \alert{biologically plausible}. 
    \end{itemize}
  \end{block}
\end{frame}
\end{document}
nounouuuuu201186
Posts: 36
Joined: Sun May 20, 2012 6:28 am

beamer | One Block displayed, the other covered

Post by nounouuuuu201186 »

I solve the problem with :

Code: Select all

\setbeamercovered{invisible}
\setbeamercovered{transparent}
\onslide<2->
here is the new code:

Code: Select all

\documentclass{beamer}
\usepackage[frenchb]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{epsfig,pslatex,colortbl}
\usepackage{graphics}
\usepackage{graphicx}%pour les includegraphics
\usepackage{array}
\usepackage{beamerthemesplit} 
\usepackage{multicol}
\usetheme{PaloAlto}
\usecolortheme{orchid}
\setbeamercovered{invisible}
\setbeamercovered{transparent}
\begin{document}
\begin{frame}[t]{General formalization of haplotyping.}
  \begin{block}{Inputs}
    \begin{itemize}
    \item A \alert{genotype matrix} $G$.
    \item The \alert{rows} of the matrix are \alert{taxa / individuals}.
    \item The \alert{columns} of the matrix are \alert{SNP sites /
        characters}. 
    \end{itemize}
  \end{block}
  \onslide<2->
  \begin{block}{Outputs}
    \begin{itemize}
    \item A \alert{haplotype matrix} $H$.
    \item Pairs of rows in $H$ \alert{explain} the rows of $G$.
    \item The haplotypes in $H$ are \alert{biologically plausible}. 
    \end{itemize}
  \end{block}
\end{frame}
\end{document}
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

beamer | One Block displayed, the other covered

Post by localghost »

Just for information to other users for awareness of possibly already existing solutions. The question has also been posted to {TeX} SX (migrated from Stack Overflow).
Post Reply