0

I work with the beamer template Heverlee that has the following setting for the itemize-command:

\definecolor{pblue} {RGB}{49,130,189} %primary blue

\setbeamercolor{item} {fg=pblue}

\setbeamertemplate{itemize item}[triangle]

Here is a sample using the code above:

\documentclass{beamer}

\definecolor{pblue} {RGB}{49,130,189} %primary blue

\setbeamercolor{item} {fg=pblue}

\setbeamertemplate{itemize item}[triangle]

\begin{document}
    \begin{frame}
        \frametitle{Sample frame title}
        \begin{itemize}
            \item a
            \item b
            \item c
        \end{itemize}
    \end{frame}
    
\end{document}

And to have a second itemize, I want exactly the same just with another name and another color, I tried the following:

\newenvironment{myitemize}

{\itemize\let\origitem\item[1][triangle]

\renewcommand{\item}{fg=pgreen}}

{\enditemize}

But I get the error message that an \item might be missing if I want to use it with \begin{myitemize}

3 Answers 3

0

I think you could read this question and answer which could be applied to your problem.

0
0

You can change the way the itemize environment behaves (like spacing or in our case we want to change its label or "bullet points").

We have to use the enumitem package to be able to change the environment and create new environments similar to itemize.

We also use the xcolor package to define colors.

The symbol we want to use is \blacktriangleright and can only be created using math mode (put in $ symbols around the command) as following.

Change existing itemize environment:

\setlist[itemize]{
    label={$\blacktriangleright$}
}

Create a new itemize environment and let's call it itemize2:

\newlist{itemize2}{itemize}{4}
\setlist[itemize2,1]{
    label={$\blacktriangleright$}
}

defining a color works as follows:

\definecolor{pblue}{RGB}{49,130,189}

The following code gets pretty close to what you want to do I think. First let's do it in the document class beamer:

\documentclass{beamer}

\usepackage{xcolor}
\usepackage{enumitem}

\definecolor{pblue}{RGB}{49,130,189}

\setlist[itemize]{
    label={\textcolor{pblue}{$\blacktriangleright$}}
}

\definecolor{pgreen}{RGB}{49,189,130}

\newlist{itemize2}{itemize}{4}
\setlist[itemize2,1]{
    label={\textcolor{pgreen}{$\blacktriangleright$}}
}

\begin{document}
    \begin{frame}
        \begin{itemize}
            \item a
            \item b
            \item c
        \end{itemize}
    \end{frame}
    
    \begin{frame}
        \begin{itemize2}
            \item a
            \item b
            \item c
        \end{itemize2}
    \end{frame}
\end{document}

enter image description here enter image description here

Now how about doing the same in a different document class?:

\documentclass{article}

\usepackage{xcolor}
\usepackage{enumitem}

\definecolor{pblue}{RGB}{49,130,189}

\setlist[itemize]{
    label={\textcolor{pblue}{$\blacktriangleright$}}
}

\definecolor{pgreen}{RGB}{49,189,130}

\newlist{itemize2}{itemize}{4}
\setlist[itemize2,1]{
    label={\textcolor{pgreen}{$\blacktriangleright$}}
}

\begin{document}
    \begin{itemize}
        \item a
        \item b
        \item c
    \end{itemize}
    
    \begin{itemize2}
        \item a
        \item b
        \item c
    \end{itemize2}
    
\end{document}
2
  • 2
    The enumitem package doesn’t really work with Beamer.
    – Alan Munn
    Apr 27, 2021 at 20:42
  • You are right! Apparently it seems to not be the ideal solution. More can be read here: tex.stackexchange.com/a/31524/206040 - consider this being a "hacky" solution for the beamer class. For other document classes this should be fine I guess.
    – owmal
    Apr 28, 2021 at 11:42
0

I managed to combine the idea in the link posted by John and the template itself:

    \newenvironment<>{try1}[1]{%
\setbeamertemplate{itemize item}[triangle]
\setbeamercolor{itemize item}{fg=pgreen}
\setbeamercolor{block body}{bg=white!95!green}
\setbeamercolor{block title}{fg=white,bg=white!95!pgreen}%
  \begin{block}#2{#1}}{\end{block}}

I just created a new block environment and set the conditions for itemize within this environment.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .