1

I would like to implement a list within a tabular environment. Without adjustments the output looks pretty akward due to horizontal spacing. However, I used the following code to align the list directly to the left hand side of the tabular environment:

\makeatletter
\newcommand{\minipagetrue}{\@minipagetrue}
\usepackage{enumitem}
\setlist[itemize]{nosep,after=\vskip-\baselineskip,label=     {\textbullet},leftmargin=*,before=\minipagetrue,}

Plugging this code into a MWE:

\documentclass[12pt,english,hideothersubsections]{beamer}
\usepackage{ragged2e,array,longtable}

%------LAYOUT--------
\usetheme{Warsaw}
\usecolortheme{wolverine}
\usefonttheme{professionalfonts}

%defining color of itemize.
\setbeamertemplate{itemize item}{\color{yellow}$\blacksquare$}
\setbeamertemplate{itemize subitem}{\color{orange}$\blacktriangleright$}

\makeatletter
\newcommand{\minipagetrue}{\@minipagetrue}
\usepackage{enumitem}
\setlist[itemize]{nosep,after=\vskip-\baselineskip,label=    {\textbullet},leftmargin=*,before=\minipagetrue,}


\begin{document}

\begin{frame}

\begin{tabular}{>{\RaggedRight}p{30mm}>{\RaggedRight}p{30mm}>{\RaggedRight}p{30mm}}

\onslide<2->{text 1} & \onslide<2->{text 2} & \onslide<2->{text 3}\\

\begin{itemize}%[leftmargin=0mm]
  \item<3-> subitem
\end{itemize}

\end{tabular}

\end{frame}


\end{document}

However, I observe two problems with my output. Firstly, the code presented first is a global code and hence refers to all list environments; I would like it to refer exclusively to list environments within a tabular. Secondly, the definition of colors of the bulletpoints disappears using the package > enumitem.

Is it possible to address both issues? If so, how?

1

I would use \setbeamercolor to change the color of beamer elements:

% defining color of itemize.
\setbeamercolor{itemize item}{fg=yellow}
\setbeamercolor{itemize subitem}{fg=orange}
% defining shape of items
\setbeamertemplate{itemize item}{\usebeamercolor[fg]{itemize item}$\blacksquare$}
\setbeamertemplate{itemize subitem}{\usebeamercolor[fg]{itemize subitem}$\blacktriangleright$}

Then you can define the item and the subitem label for itemize using enumitem

\usepackage{enumitem}
\setlist[itemize,1]{label=\usebeamertemplate{itemize item}}
\setlist[itemize,2]{label=\usebeamertemplate{itemize subitem}}

If you want a special list for tables you can define a new one:

\newlist{tabitemize}{itemize}{2}
\setlist[tabitemize]{nosep,leftmargin=*}
\setlist[tabitemize,1]{label=\usebeamercolor[fg]{itemize item}\textbullet}
\setlist[tabitemize,2]{label=\usebeamercolor[fg]{itemize subitem}\textbullet}

Now you can use tabitemize inside tables and itemize outside tables.

enter image description here

Code:

\documentclass[12pt,english,hideothersubsections]{beamer}
\usepackage{ragged2e,array,longtable}

%------LAYOUT--------
\usetheme{Warsaw}
\usecolortheme{wolverine}
\usefonttheme{professionalfonts}

% defining color of itemize.
\setbeamercolor{itemize item}{fg=yellow}
\setbeamercolor{itemize subitem}{fg=orange}
% defining shape of items
\setbeamertemplate{itemize item}{\usebeamercolor[fg]{itemize item}$\blacksquare$}
\setbeamertemplate{itemize subitem}{\usebeamercolor[fg]{itemize subitem}$\blacktriangleright$}

\usepackage{enumitem}
\setlist[itemize,1]{label=\usebeamertemplate{itemize item}}
\setlist[itemize,2]{label=\usebeamertemplate{itemize subitem}}
% define tabitmize for tables
\newlist{tabitemize}{itemize}{2}
\setlist[tabitemize]{nosep,leftmargin=*}
\setlist[tabitemize,1]{label=\usebeamercolor[fg]{itemize item}\textbullet}
\setlist[tabitemize,2]{label=\usebeamercolor[fg]{itemize subitem}\textbullet}

\begin{document}
\begin{frame}
\begin{tabular}{>{\RaggedRight}p{30mm}>{\RaggedRight}p{30mm}>{\RaggedRight}p{30mm}}
  \onslide<2->{text 1} & \onslide<2->{text 2} & \onslide<2->{text 3}\\
  \begin{tabitemize}
    \item<3-> item inside table
    \begin{tabitemize}
      \item <3-> subitem inside table
    \end{tabitemize}
  \end{tabitemize}
\end{tabular}

Text

\begin{itemize}
  \item<2-> item outside table
  \begin{itemize}
    \item<3-> subitem outside table
  \end{itemize}
 \end{itemize}
\end{frame}
\end{document}

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.