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 am trying to manipulate the exact position of a TikZ cloud but I am not sure if I'm doing any effort at all.

As you see in the aforementioned picture the space between items is not beautiful. So I tried to add it outside the itemize enviroment. It seems, though that it's not following my commands. The code I am using is

\documentclass[slidestop,compress,mathserif,12pt,xcolor=dvipsnames]{beamer}
\graphicspath{{images/}}
\definecolor{LHCblue}{RGB}{4, 114, 255}
\usecolortheme[named=LHCblue]{structure}
\usepackage[bars]{beamerthemetree} % Beamer theme v 2.2
\usepackage{kerkis}
\usepackage{multimedia}
\usepackage{subfigure}
\mode<presentation>
%frame
\newcommand*\oldmacro{}%
\let\oldmacro\insertshorttitle%
\renewcommand*\insertshorttitle{%
     \oldmacro\hfill%
  \insertframenumber\,}%/\,\inserttotalframenumber
\setbeamertemplate{footline}[frame number]
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\setbeamercovered{higly dynamic}
\usetheme[watermark=ntua-logo.jpg]{Ilmenau} % Beamer theme v 3.0
\useoutertheme[subsection=true]{smoothbars}%Beamer Outer Theme-circles on top

\useinnertheme{circles} %rectangle bullet points instead of circle ones
\usepackage{beamerthemebars}
\setbeamercolor{navigation symbols dimmed}{fg=red!80!black}
\setbeamercolor{navigation symbols}{fg=red!80!black}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\title[July 2012 H4 Test Beam\hspace{3cm} Stony Brook, NYC]{July 2012 H4 Test Beam}
\author[Stamatopoulos N. Athanasios\hspace{2.5cm}{athanasios.stamatopoulos@cern.ch}]        {Stamatopoulos N. Athanasios}
\institute{NTUA/CERN}
\logo{%
  \makebox[0.99\paperwidth]{%
    \includegraphics[width=1cm,keepaspectratio]{cern_logo_white.jpg}%
    \hfill%
    \includegraphics[width=1cm,keepaspectratio]{ntua-logo.jpg}%
  }%
}

\usepackage{textpos}
\usepackage{tikz}
\usetikzlibrary{%
calc,%
fadings,%
shadings%
}

\usetikzlibrary{arrows,snakes,shapes}
%\usepackage{enumitem}
%\usepackage{paralist}

   \begin{document}

    \begin{frame}
\begin{itemize}
    \item XY Resistive MM
    \item Manufactured by Rui de Oliveira \quad \uncover<1->{\begin{tikzpicture}
\node[align=center,draw,shading=ball,text=white,cloud callout,cloud puffs=17,cloud puff arc     =140,callout pointer segments=3,anchor=pointer,callout relative pointer={(200:2 cm )},     aspect =2.5,scale=0.5]
at(current page.east){Thank you Rui!};
\end{tikzpicture}}
    \item bla bla bla
\end{itemize}
\begin{tikzpicture}
\node[align=center,draw,shading=ball,text=white,cloud callout,cloud puffs=17,cloud puff arc     =140,callout pointer segments=3,anchor=pointer,callout relative pointer={(200:2 cm )},     aspect =2.5,scale=0.5]
at(current page.north east){Thank you Rui!};
\end{tikzpicture}
\end{frame}

\end{document}

Any ideas for this?

share|improve this question

2 Answers 2

up vote 7 down vote accepted

Aw, percusse was faster. I basically did the same, but turned it into a macro with the parameters [angle]{content}:

Code

\documentclass{beamer}
\usetheme{Darmstadt}
\usepackage{tikz}
\usetikzlibrary{shapes}

\newcommand{\Cloud}[2][180]% [angle], content
{   \begin{tikzpicture}[overlay]
        \node[align=center, draw, shading=ball, text=white, cloud callout, cloud puffs=17, cloud puff arc=140, callout pointer segments=3, anchor=pointer, callout relative pointer={(#1:2 cm )}, aspect=4,scale=0.5] at (0.2ex,0.5ex) {#2};
\end{tikzpicture}
}

\begin{document}

\begin{frame}[t]
    \begin{itemize}
        \item XY Resistive MM\Cloud{Thank you Rui}
    \item Manufactured by Rui de Oliveira\Cloud[160]{Thanks again}
    \item bla bla bla\Cloud[120]{Thanks yet another time}
    \end{itemize}
\end{frame}

\end{document}

Result

enter image description here

share|improve this answer
    
Oh I think yours is much more structured, I've deleted mine. Can you include the obsolete options warning in your answer? –  percusse Sep 27 '12 at 12:46
    
Actually, as I simplified the given MWE a lot, no such warnings appear for me. –  Tom Bombadil Sep 27 '12 at 13:01
    
Thank you guys very much! I really liked the newcommand. It is really fancy! Thank you both soooo much!!! –  Thanos Sep 27 '12 at 13:19
    
@percusse: did it in my answer. –  Claudio Fiandrino Sep 27 '12 at 16:21

Here is another approach: at first the point where the cloud should start is marked and then the could is positioned starting from that position. The command \mycallout is overlay-aware therefore allows you some customization.

Notice that you can position a cloud regardless having marked a point, but doing it allows the pointer to be vertically aligned with respect the sentence (the last cloud is not).

\documentclass[slidestop,compress,mathserif,12pt,xcolor=dvipsnames]{beamer}
\graphicspath{{images/}}
\definecolor{LHCblue}{RGB}{4, 114, 255}
\usecolortheme[named=LHCblue]{structure}
\usepackage[bars]{beamerthemetree} % Beamer theme v 2.2
\usepackage{kerkis}
\usepackage{multimedia}
\usepackage{subfigure}
\mode<presentation>
%frame
\newcommand*\oldmacro{}%
\let\oldmacro\insertshorttitle%
\renewcommand*\insertshorttitle{%
     \oldmacro\hfill%
  \insertframenumber\,}%/\,\inserttotalframenumber
\setbeamertemplate{footline}[frame number]
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\setbeamercovered{higly dynamic}
\usetheme[watermark=ntua-logo.jpg]{Ilmenau} % Beamer theme v 3.0
\useoutertheme[subsection=true]{smoothbars}%Beamer Outer Theme-circles on top

\useinnertheme{circles} %rectangle bullet points instead of circle ones
\usepackage{beamerthemebars}
\setbeamercolor{navigation symbols dimmed}{fg=red!80!black}
\setbeamercolor{navigation symbols}{fg=red!80!black}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\title[July 2012 H4 Test Beam\hspace{3cm} Stony Brook, NYC]{July 2012 H4 Test Beam}
\author[Stamatopoulos N. Athanasios\hspace{2.5cm}{athanasios.stamatopoulos@cern.ch}]        {Stamatopoulos N. Athanasios}
\institute{NTUA/CERN}
\logo{%
  \makebox[0.99\paperwidth]{%
    \includegraphics[width=1cm,keepaspectratio]{logopolito}%
    \hfill%
    \includegraphics[width=1cm,keepaspectratio]{ntua-logo}%
  }%
}

\usepackage{textpos}
\usepackage{tikz}
\usetikzlibrary{%
calc,%
fadings,%
shadings%
}

\usetikzlibrary{arrows,decorations,shapes}
%\usepackage{enumitem}
%\usepackage{paralist}

\usepackage{xparse}

 \tikzset{
    invisible/.style={opacity=0},
    visible on/.style={alt=#1{}{invisible}},
    alt/.code args={<#1>#2#3}{%
      \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}} % \pgfkeysalso doesn't change the path
    },
  }

\NewDocumentCommand{\mycallout}{r<> m m}{%
\tikz[remember picture, overlay]\node[visible on=<#1>,align=center,draw,shading=ball,text=white,cloud callout,cloud puffs=17,cloud puff arc=140,callout pointer segments=3,anchor=pointer,callout relative pointer={(200:2cm)}, aspect =2.5,scale=0.5]
at (#2) {#3};
}

\newcommand{\tikzmark}[1]{\tikz[overlay,remember picture,baseline=-0.5ex] \node (#1) {};}

\begin{document}

\begin{frame}
\begin{itemize}
    \item<1-> XY Resistive MM
    \item<2-> Manufactured by Rui de Oliveira \tikzmark{this point}\quad 
     \mycallout<3>{this point}{Thank you Rui!}
    \item<4-> Another sentence with a callout \tikzmark{bla} \mycallout<5>{bla}{Bla bla bla}
\end{itemize}
\vfill
Another text. \mycallout<6>{0,0}{My text}
\vfill
\end{frame}

\end{document}

Result:

enter image description here


Percusse suggested to comment the warning deriving from your code:

  • the option slidetop:

Class beamer Warning: slidestop'' is obsolete. Uset'' instead on input lin e 343.

  • the option mathserif:

Class beamer Warning: mathserif'' is obsolete. Use font themeserif'' with option ``onlymath'' on input line 343.

You can avoid them by means of substituting the first two lines in your code:

\documentclass[t,compress,12pt,xcolor=dvipsnames,]{beamer}
\usefonttheme[onlymath]{serif}

Notice that also the snakes library is obsolete: you can use decorations although in the current example is not needed.


The equivalent xparse-free solution:

\documentclass[t,compress,12pt,xcolor=dvipsnames,]{beamer}
\usefonttheme[onlymath]{serif}
\usepackage{lmodern}
\graphicspath{{images/}}
\definecolor{LHCblue}{RGB}{4, 114, 255}
\usecolortheme[named=LHCblue]{structure}
\usepackage[bars]{beamerthemetree} % Beamer theme v 2.2
\usepackage{kerkis}
\usepackage{multimedia}
\usepackage{subfigure}
\mode<presentation>
%frame
\newcommand*\oldmacro{}%
\let\oldmacro\insertshorttitle%
\renewcommand*\insertshorttitle{%
     \oldmacro\hfill%
  \insertframenumber\,}%/\,\inserttotalframenumber
\setbeamertemplate{footline}[frame number]
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\setbeamercovered{higly dynamic}
\usetheme[watermark=ntua-logo.jpg]{Ilmenau} % Beamer theme v 3.0
\useoutertheme[subsection=true]{smoothbars}%Beamer Outer Theme-circles on top

\useinnertheme{circles} %rectangle bullet points instead of circle ones
\usepackage{beamerthemebars}
\setbeamercolor{navigation symbols dimmed}{fg=red!80!black}
\setbeamercolor{navigation symbols}{fg=red!80!black}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\title[July 2012 H4 Test Beam\hspace{3cm} Stony Brook, NYC]{July 2012 H4 Test Beam}
\author[Stamatopoulos N. Athanasios\hspace{2.5cm}{athanasios.stamatopoulos@cern.ch}]        {Stamatopoulos N. Athanasios}
\institute{NTUA/CERN}
\logo{%
  \makebox[0.99\paperwidth]{%
    \includegraphics[width=1cm,keepaspectratio]{logopolito}%
    \hfill%
    \includegraphics[width=1cm,keepaspectratio]{ntua-logo}%
  }%
}

\usepackage{textpos}
\usepackage{tikz}
\usetikzlibrary{%
calc,%
fadings,%
shadings%
}

\usetikzlibrary{arrows,decorations,shapes}
%\usepackage{enumitem}
%\usepackage{paralist}

 \tikzset{
    invisible/.style={opacity=0},
    visible on/.style={alt=#1{}{invisible}},
    alt/.code args={<#1>#2#3}{%
      \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}} % \pgfkeysalso doesn't change the path
    },
  }

\newcommand{\mycallout}[3]{%
\tikz[remember picture, overlay]\node[visible on=<#1>,align=center,draw,shading=ball,text=white,cloud callout,cloud puffs=17,cloud puff arc=140,callout pointer segments=3,anchor=pointer,callout relative pointer={(200:2cm)}, aspect =2.5,scale=0.5]
at (#2) {#3};
}

\newcommand{\tikzmark}[1]{\tikz[overlay,remember picture,baseline=-0.5ex] \node (#1) {};}

\begin{document}

\begin{frame}
\begin{itemize}
    \item<1-> XY Resistive MM
    \item<2-> Manufactured by Rui de Oliveira \tikzmark{this point}\quad 
     \mycallout{3}{this point}{Thank you Rui!}
    \item<4-> Another sentence with a callout \tikzmark{bla} \mycallout{5}{bla}{Bla bla bla}
\end{itemize}
\vfill
Another text. \mycallout{6}{0,0}{My text}
\vfill
\end{frame}

\end{document}
share|improve this answer
    
It seems that writing thesis trim down the programming quickness :D –  Claudio Fiandrino Sep 27 '12 at 12:32
    
Thank you very much for your answer! Your comment, is striking directly on the spot :) But OK, I admit it: I am not a software guy...!!! The thing about your answer is that it isn't working on my system. Somehow NewDocumentCommand seems to be very nasty for my system... –  Thanos Sep 27 '12 at 13:17
    
My comment was related to the fact that it took to me too much time to write the answer. For what concern NewDocumentCommand: do you have problems with the xparse package? I've use it mainly to have the possibility of declaring as delimeters <> for the overlay specifications. –  Claudio Fiandrino Sep 27 '12 at 15:59
    
Thanks for the update. –  percusse Sep 27 '12 at 20:06

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.