Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to put boxed text/block in Beamer and my LaTeX source is

\documentclass[pdf]{beamer}
\begin{document}
\begin{frame}
\begin{block}{Observation 1}
Simmons Hall is composed of metal and concrete.
\end{block}
\begin{block}{Observation 2}
Simmons Dormitory is composed of brick.
\end{block}
\begin{block}{Conclusion}
Simmons Hall $\not=$ Simmons Dormitory.
\end{block}
\end{frame}
\end{document}

This results in enter image description here whereas what I want is enter image description here

share|improve this question

2 Answers 2

up vote 6 down vote accepted

Your MWE is using the default beamer theme, which doesn't define the blocks to have the colors you want. Try using a different theme, as below. Also, to get blue/green/red use block/exampleblock/alertblock, respectively.

\documentclass[pdf]{beamer}
\usetheme{Copenhagen}
\begin{document}
\begin{frame}
\frametitle{Frame title}
\begin{block}{Observation 1}
Simmons Hall is composed of metal and concrete.
\end{block}
\begin{exampleblock}{Observation 2}
Simmons Dormitory is composed of brick.
\end{exampleblock}
\begin{alertblock}{Conclusion}
Simmons Hall $\not=$ Simmons Dormitory.
\end{alertblock}
\end{frame}
\end{document}

You can also customize how things look by using \useinnertheme{} and \usecolortheme{}. See the beamer documentation for more info.

enter image description here

share|improve this answer
    
Thanks. It works –  kamalbanga Apr 29 at 15:30

You need to use a theme to have blocks appearing this way. Here is an example with "Boadilla"

\documentclass[10pt,a4paper]{beamer}
\usepackage[utf8]{inputenc}

\usetheme[secheader]{Boadilla}

\begin{document}

\begin{frame}{Title Frame}
    Introduction sentece
    \begin{block}{Title Block 1}
    {
        \begin{itemize}
        \item item 1
        \item item 2
        \end{itemize}
    }
    \end{block}
    \begin{exampleblock}{Title Block 2}
    {
        Text.
    }
    \end{exampleblock}
    \begin{alertblock}{Title Block 3}
    {
        You
    }
    \end{alertblock}    
\end{frame}

\end{document}

giving the result :

Preview of blocks

You need to use block, exampleblock and alertblock.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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