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.

The goal is to create a table that has the same style than a block of the used theme in order to have a consequent style trough the document. this can be done by the following two methodes shown in the code. the last tweak although is to add nice horizontal and vertical lines separating the "cells". I tried this using tabular, but the vertical line is separated, is there any way to get this perfect / do this at all ?

\documentclass{beamer}  
\usetheme{Berlin}  
\setbeamertemplate{blocks}[rounded][shadow=true]

\usepackage[USenglish]{babel}  
\usepackage{times}  
\usepackage{tikz}  
\usepackage{parskip}  

\begin{document}      

% Methode 1                                             
\begin{frame}[t]

\tikzset{blocknode/.style={inner sep=0,text width=0.5\textwidth,below right}}

\begin{block}{\tikz{\node[blocknode] {asdf}; \node[blocknode] at (0.5\textwidth,0) {qwertz};}}
\begin{tikzpicture}
\node[blocknode] {\begin{itemize}\item a\item b\end{itemize}};
\node[blocknode] at (0.5\textwidth,0) {\begin{itemize}\item c\item d\end{itemize}};
\end{tikzpicture}
\end{block}

% Methode 2
\begin{block}{
\begin{center}
\begin{tabular}{p{0.45\textwidth}|p{0.45\textwidth}}
  1 & 2 \\
\end{tabular}
\end{center}}

\begin{center}
\begin{tabular}{p{0.45\textwidth}|p{0.45\textwidth}}
  \begin{itemize}\item 3\end{itemize} &
  \begin{itemize}\item 4\end{itemize}\\ \hline
  \begin{itemize}\item 5\end{itemize} &
  \begin{itemize}\item 6\end{itemize} \\ \hline
  \begin{itemize}\item 7\end{itemize} &
  \begin{itemize}\item 8\end{itemize} \\
\end{tabular}
\end{center}
\end{block}

\end{frame}
\end{document}

enter image description here

share|improve this question
5  
Please have a look at this why-not-use-vertical-lines-in-a-tabular –  percusse Aug 11 '12 at 22:23
    
I think also that vertical lines are not very nice –  Fran Aug 21 '12 at 23:48
    
There’s basically the same question with a different answer. –  Crissov Feb 12 at 12:01
add comment

1 Answer

up vote 4 down vote accepted

In method 2, you can make a empty block caption and then up a little the table:

\documentclass{beamer}  
\usetheme{Berlin}  
\setbeamertemplate{blocks}[rounded][shadow=true]

\usepackage[USenglish]{babel}  
\usepackage{times}  
\usepackage{tikz}  
\usepackage{parskip}  

\begin{document}      

\begin{frame}[t]

% Methode 2
\begin{block}{~\vspace{0.7cm}}
\begin{center}
\vspace{-0.8cm}
\begin{tabular}{p{0.45\textwidth}|p{0.45\textwidth}}
 \textcolor{white}{\bf Head 1} & \textcolor{white}{\bf Head 2} \\
  \begin{itemize}\item 3\end{itemize} &
  \begin{itemize}\item 4\end{itemize}\\ \hline
  \begin{itemize}\item 5\end{itemize} &
  \begin{itemize}\item 6\end{itemize} \\ \hline
  \begin{itemize}\item 7\end{itemize} &
  \begin{itemize}\item 8\end{itemize} \\
\end{tabular}
\end{center}
\end{block}

\end{frame}
\end{document}

block with table

share|improve this answer
add comment

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.