5

I am working with the MWE below and I am trying to do something that seems to be easy, but I cannot figure out.

\documentclass{beamer}

\usepackage{tikz}
\usetikzlibrary{positioning,calc,decorations.pathreplacing}

\begin{document}



\begin{frame}

\begin{tikzpicture}
    \node (B) at (0,0) {\includegraphics[scale=.2]{example-image}};


    \node[circle, fill=red!50!black, opacity=.5, minimum size=.4cm] (nuc) at (B) {};
    \node[circle, fill=red!50!black, opacity=.5, minimum size=.4cm] (cyt) at ($(B)+(.4,.4)$) {};
    \node[circle, fill=green!25!black, opacity=.5, minimum size=.4cm] (cha) at ($(B)+(.8,-.6)$) {};
    \node[circle, fill=green!25!black, opacity=.5, minimum size=.4cm] (mem) at ($(B)+(.4,-1)$) {};


    \node[right=1cm of B.north east, align=left, text width=3cm, font=\tiny, fill=yellow] (C1) {
        \begin{itemize}
         \item RNA processing
         \item DNA repair
         \item cell cycle regulation
         \item cellular component organization
         \item metabolic pathways
        \end{itemize}
    };
    \draw[thick,decorate,decoration={brace,mirror,amplitude=5pt}, color=red!50!black] (C1.north west) -- (C1.south west) node[midway] {};

    \node[right=0.5cm of B.east, align=left, shift={(0cm,-1.5cm)}, text width=4cm, font=\tiny, fill=yellow] (C2) {
        \begin{itemize}
         \item bind growth factors, receptors and metal ions
         \item cell signaling and communication
         \item cell migration, motility, localization and adhesion
        \end{itemize}
    };
    \draw[thick,decorate,decoration={brace,mirror,amplitude=5pt}, color=green!25!black] (C2.north west) -- (C2.south west) node[midway] {};

    \path[->, >=latex, red!50!black, opacity=.6, line width=1pt] {[out=350,in=180]
        (nuc) edge ($(C1.west)-(.2,0)$)
        (cyt) edge ($(C1.west)-(.2,0)$)};
    \path[->, >=latex, green!25!black, opacity=.6, line width=1pt] {[out=350,in=180]
        (cha) edge ($(C2.west)-(.2,0)$)
        (mem) edge ($(C2.west)-(.2,0)$)};

\end{tikzpicture}
\end{frame}

\end{document}

It produces the following output:

I would just want:

  1. Red text in the upper yellow box and green text in the lower one

  2. Red and green circle for each item

  3. No vertical space between items

  4. No indentation for the items

  5. No horizontal space between item circle and text

Any help would be appreciated.

  • For 1, 2: use \begin{itemize}\color{red} and \begin{itemize}\color{green} – Sigur Jul 19 '14 at 0:08
  • Do you mean vertical in 3? What else goes on this slide? Anything? – cfr Jul 19 '14 at 1:59
  • Use \setbeamertemplate{itemize items}[circle] after the start of the frame but before the start of the picture for circles. Use \setbeamercolor{local structure}{fg=red!50!black}\color{red!50!black} before \begin{itemize} for the colour. This will change the curly bracket's colour as well which I suspect you want here. Use the squeeze frame option to eliminate vertical space between items (if that's what you meant in 3). – cfr Jul 19 '14 at 2:31
  • @cfr yes vertical, sorry. The slide only has text above and another image at the left... – DaniCee Jul 19 '14 at 4:12
  • I asked about what else because squeeze will affect the whole slide so it might be problematic if you had another itemize, say, where you wanted the inter-item space. – cfr Jul 19 '14 at 14:48
3

Playing a little bit with:

\setbeamertemplate{itemize items}[circle]

\setbeamercolor{local structure}{fg=red!50!black}\color{red!50!black}

\setlength{\leftmargini}{6pt}

\setlength{\labelsep}{1pt}

\color{red!50!black}

\itemsep1pt

I came up with the following MWE:

\documentclass{beamer}

\usepackage{tikz}
\usetikzlibrary{positioning,calc,decorations.pathreplacing}

\begin{document}



\begin{frame}

\begin{tikzpicture}[every node/.style={inner sep=0,outer sep=0}]
    \node (B) at (0,0) {\includegraphics[scale=.2]{example-image}};


    \node[circle, fill=red!50!black, opacity=.5, minimum size=.4cm] (nuc) at (B) {};
    \node[circle, fill=red!50!black, opacity=.5, minimum size=.4cm] (cyt) at ($(B)+(.4,.4)$) {};
    \node[circle, fill=green!25!black, opacity=.5, minimum size=.4cm] (cha) at ($(B)+(.8,-.6)$) {};
    \node[circle, fill=green!25!black, opacity=.5, minimum size=.4cm] (mem) at ($(B)+(.4,-1)$) {};


    \node[right=1cm of B.north east, align=left, text width=3.2cm, font=\tiny, fill=yellow] (C1) {
    \setbeamertemplate{itemize items}[circle]
    \setbeamercolor{local structure}{fg=red!50!black}\color{red!50!black}
    \setlength{\leftmargini}{6pt}
    \setlength{\labelsep}{1pt}
        \begin{itemize}
        \color{red!50!black}
        \itemsep1pt
            \item RNA processing
            \item DNA repair
            \item cell cycle regulation
            \item cellular component organization
            \item metabolic pathways
        \end{itemize}
    };
    \draw[thick,decorate,decoration={brace,mirror,amplitude=5pt}, color=red!50!black] (C1.north west) -- (C1.south west) node[midway] {};

    \node[right=0.5cm of B.east, align=left, shift={(0cm,-1.5cm)}, text width=4.8cm, font=\tiny, fill=yellow] (C2) {
        \setbeamertemplate{itemize items}[circle]
        \setbeamercolor{local structure}{fg=green!25!black}\color{red!50!black}
        \setlength{\leftmargini}{6pt}
        \setlength{\labelsep}{1pt}
        \begin{itemize}
        \color{green!25!black}
        \itemsep1pt
            \item bind growth factors, receptors and metal ions
            \item cell signaling and communication
            \item cell migration, motility, localization and adhesion
        \end{itemize}
    };
    \draw[thick,decorate,decoration={brace,mirror,amplitude=5pt}, color=green!25!black] (C2.north west) -- (C2.south west) node[midway] {};

    \path[->, >=latex, red!50!black, opacity=.6, line width=1pt] {[out=350,in=180]
        (nuc) edge ($(C1.west)-(.2,0)$)
        (cyt) edge ($(C1.west)-(.2,0)$)};
    \path[->, >=latex, green!25!black, opacity=.6, line width=1pt] {[out=350,in=180]
        (cha) edge ($(C2.west)-(.2,0)$)
        (mem) edge ($(C2.west)-(.2,0)$)};

\end{tikzpicture}
\end{frame}

\end{document}

It produces the following: enter image description here

It seems, though, like item symbols are not aligned with the text... Is it me, or are they clearly above the text? Is there a way to solve it?

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.