与 tikzducks 对话,聊天气泡将 tikzpicture 放置在 beamer 列内

与 tikzducks 对话,聊天气泡将 tikzpicture 放置在 beamer 列内

更新:

我想让这些鸭子互相交谈,但我不知道如何缩放聊天气泡或实际的鸭子。我理想情况下希望它们在两边交替出现,彼此面对,中间出现一个气泡。

我可以改变鸭子的方向,但我无法将它们正确放置在我的投影仪柱内。似乎限制不正确。

我如何识别我的投影仪柱的设置?

\documentclass{beamer}
\usepackage{xcolor}
\usepackage{framed}
\usepackage{environ}
\usepackage{varwidth}
\usepackage{media9}
\usetheme[progressbar=frametitle]{metropolis}
\setbeamerfont{title}{size=\Huge}
\usecolortheme{spruce}
\setbeamercolor{background canvas}{bg=white}
\usepackage{kpfonts}
\usepackage{amsmath}
\setbeamertemplate{frametitle}[default][center]
\usepackage{cases}
\usepackage{multimedia}
\usepackage[export]{adjustbox}
\usepackage{graphicx}
\graphicspath{ {./images/} }
\usepackage{physics}  
\usepackage{tikzducks}


\begin{document}
\begin{frame}[t,plain]{\Large{Math 2212: Supplemental Instruction}}
\noindent
\begin{columns}

\column{.5\textwidth}
\hfill
\begin{tikzpicture}[transform canvas={scale=.75}]%
\duck[glasses,think={Learn Math with me!}];

\end{tikzpicture}%

\begin{tikzpicture}[transform canvas={scale=.75},xscale=-1,xshift=-4cm]%
\fill[green!50!brown!80!black, rotate around={-15:(0.47,1.88)}] (0.47,1.88) ellipse (0.055 and 0.023);
\fill[green!50!brown!80!black, rotate around={15:(0.47,1.83)}] (0.47,1.83) ellipse (0.055 and 0.023);\duck[jacket=red!30!gray,think={Math 2212}]
\begin{pgfinterruptboundingbox}
\filldraw[gray!10!white] 
(0.460,1.140) .. controls (0.267, 1.102) and (-0.125,0.657) .. (0.289,0.261) .. controls (0.704,-0.135) and (2.863,0.130) .. (1.818,1.419) .. controls (0.980, 1.000) and ( 1.240,1.378) .. (0.46,0.55) -- cycle;
\end{pgfinterruptboundingbox}
\draw (1.29,1.82) -- (1.19,1.77) -- (1.1,1.74) -- (1,1.74);
\fill[green!50!brown!80!black, rotate around={15:(1,1.72)}] (1,1.72) ellipse (0.055 and 0.023);
\fill[green!50!brown!80!black, rotate around={18:(1.1,1.716)}] (1.1,1.716) ellipse (0.055 and 0.023);
\fill[green!50!brown!80!black, rotate around={45:(1.2,1.75)}] (1.2,1.75) ellipse (0.055 and 0.023);
\fill[green!50!brown!80!black, rotate around={70:(1.3,1.8)}] (1.3,1.8) ellipse (0.055 and 0.023);
\fill[green!50!brown!80!black, rotate around={-25:(1,1.76)}] (1,1.76) ellipse (0.055 and 0.023);
\fill[green!50!brown!80!black, rotate around={-25:(1.1,1.76)}] (1.1,1.76) ellipse (0.055 and 0.023);
\fill[green!50!brown!80!black, rotate around={-20:(1.19,1.79)}] (1.19,1.79) ellipse (0.055 and 0.023);
\fill[green!50!brown!80!black, rotate around={10:(1.27,1.84)}] (1.27,1.84) ellipse (0.055 and 0.023);
\end{tikzpicture}%
 

\column{.5\textwidth}  
\centering

\large{\textbf{\textit{S.I. SESSION'S ARE AVAILABLE}}}\vspace{.2cm}

\small{\textit{Course\dotfill MATH 2212}\\}
\small{\textit{Professor\dotfill Dr. Math}\\}
\small{\textit{Time\dotfill 9am - 10:45am}\\}
\small{\textit{CRN Number\dotfill xxx}\\}\vspace{.2cm}
         
\textbf{S.I. Session: \textit{NE 0360} \\ Monday 4pm - 5pm\\\vspace{.2cm}}
\textbf{Q\&A Sesssion: \textit{NE 0360} \\ Tuesday 5pm - 6pm\\\vspace{.2cm}}
\textbf{S.I. Session: \textit{NE 0360} \\ Thursday 5pm - 6pm\\\vspace{.2cm}}

Instructor: \hfill xxx\\
E-Mail: \hfill xxx
\end{columns}
\noindent
\end{frame}


\end{document}

在此处输入图片描述

答案1

使用 TikZ 库shapes.callouts,您还可以自定义调用。

\documentclass{beamer}
\usepackage{xcolor}
\usepackage{framed}
\usepackage{environ}
\usepackage{varwidth}
\usepackage{media9}
\usetheme[progressbar=frametitle]{metropolis}
\setbeamerfont{title}{size=\Huge}
\usecolortheme{spruce}
\setbeamercolor{background canvas}{bg=white}
\usepackage{kpfonts}
\usepackage{amsmath}
\setbeamertemplate{frametitle}[default][center]
\usepackage{cases}
\usepackage{multimedia}
\usepackage[export]{adjustbox}
\usepackage{graphicx}
\graphicspath{ {./images/} }
\usepackage{physics}  
\usepackage{tikzducks}
\usetikzlibrary {shapes.callouts}

\begin{document}
\begin{frame}[t,plain]{\Large{Math 2212: Supplemental Instruction}}
\begin{columns}

\column{.5\textwidth}
\vfill


\begin{tikzpicture}[scale=.7]
\duck[glasses, xscale=-1];
\node[cloud callout, inner sep= 0pt, fill=pink!50, aspect=3,  cloud puff arc=120, text width=2.5cm, text centered, xshift=1cm, yshift=2cm, callout relative pointer={(-.2,-.5)}] at (bill) {Learn Math\\ with me!};
\end{tikzpicture}

\vfill
 
\hspace{1cm}\begin{tikzpicture}[scale=.7]
\fill[green!50!brown!80!black, rotate around={-15:(0.47,1.88)}] (0.47,1.88) ellipse (0.055 and 0.023);
\fill[green!50!brown!80!black, rotate around={15:(0.47,1.83)}] (0.47,1.83) ellipse (0.055 and 0.023);
\duck[jacket=red!30!gray]
\node[cloud callout, inner sep= 0pt, fill=cyan!30, aspect=3, cloud puff arc=120,  xshift=-1.2cm, yshift=1.5cm,] at (bill) {Math 2212};
\begin{pgfinterruptboundingbox}
\filldraw[gray!10!white] 
(0.460,1.140) .. controls (0.267, 1.102) and (-0.125,0.657) .. (0.289,0.261) .. controls (0.704,-0.135) and (2.863,0.130) .. (1.818,1.419) .. controls (0.980, 1.000) and ( 1.240,1.378) .. (0.46,0.55) -- cycle;
\end{pgfinterruptboundingbox}
\draw (1.29,1.82) -- (1.19,1.77) -- (1.1,1.74) -- (1,1.74);
\fill[green!50!brown!80!black, rotate around={15:(1,1.72)}] (1,1.72) ellipse (0.055 and 0.023);
\fill[green!50!brown!80!black, rotate around={18:(1.1,1.716)}] (1.1,1.716) ellipse (0.055 and 0.023);
\fill[green!50!brown!80!black, rotate around={45:(1.2,1.75)}] (1.2,1.75) ellipse (0.055 and 0.023);
\fill[green!50!brown!80!black, rotate around={70:(1.3,1.8)}] (1.3,1.8) ellipse (0.055 and 0.023);
\fill[green!50!brown!80!black, rotate around={-25:(1,1.76)}] (1,1.76) ellipse (0.055 and 0.023);
\fill[green!50!brown!80!black, rotate around={-25:(1.1,1.76)}] (1.1,1.76) ellipse (0.055 and 0.023);
\fill[green!50!brown!80!black, rotate around={-20:(1.19,1.79)}] (1.19,1.79) ellipse (0.055 and 0.023);
\fill[green!50!brown!80!black, rotate around={10:(1.27,1.84)}] (1.27,1.84) ellipse (0.055 and 0.023);
\end{tikzpicture}
 

\column{.5\textwidth}  
\centering

\large{\textbf{\textit{S.I. SESSION'S ARE AVAILABLE}}}\vspace{.2cm}

\small{\textit{Course\dotfill MATH 2212}\\}
\small{\textit{Professor\dotfill Dr. Math}\\}
\small{\textit{Time\dotfill 9am - 10:45am}\\}
\small{\textit{CRN Number\dotfill xxx}\\}\vspace{.2cm}
         
\textbf{S.I. Session: \textit{NE 0360} \\ Monday 4pm - 5pm\\\vspace{.2cm}}
\textbf{Q\&A Sesssion: \textit{NE 0360} \\ Tuesday 5pm - 6pm\\\vspace{.2cm}}
\textbf{S.I. Session: \textit{NE 0360} \\ Thursday 5pm - 6pm\\\vspace{.2cm}}

Instructor: \hfill xxx\\
E-Mail: \hfill xxx
\end{columns}
\end{frame}
\end{document}

在此处输入图片描述

我认为ellipse callout也可能适用:

\documentclass{beamer}
\usepackage{xcolor}
\usepackage{framed}
\usepackage{environ}
\usepackage{varwidth}
\usepackage{media9}
\usetheme[progressbar=frametitle]{metropolis}
\setbeamerfont{title}{size=\Huge}
\usecolortheme{spruce}
\setbeamercolor{background canvas}{bg=white}
\usepackage{kpfonts}
\usepackage{amsmath}
\setbeamertemplate{frametitle}[default][center]
\usepackage{cases}
\usepackage{multimedia}
\usepackage[export]{adjustbox}
\usepackage{graphicx}
\graphicspath{ {./images/} }
\usepackage{physics}  
\usepackage{tikzducks}
\usetikzlibrary {shapes.callouts}

\begin{document}
\begin{frame}[t,plain]{\Large{Math 2212: Supplemental Instruction}}
\begin{columns}

\column{.5\textwidth}
\vfill


\begin{tikzpicture}[scale=.7]
\duck[glasses, xscale=-1];
\node[ellipse callout, fill=pink!50, text width=2.5cm, text centered, xshift=1cm, yshift=1.7cm, callout relative pointer={(-.3,-.7)}] at (bill) {Learn Math\\ with me!};
\end{tikzpicture}

\vspace{.5cm}
 
\hspace{1cm}\begin{tikzpicture}[scale=.7]
\fill[green!50!brown!80!black, rotate around={-15:(0.47,1.88)}] (0.47,1.88) ellipse (0.055 and 0.023);
\fill[green!50!brown!80!black, rotate around={15:(0.47,1.83)}] (0.47,1.83) ellipse (0.055 and 0.023);
\duck[jacket=red!30!gray]
\node[ellipse callout, fill=cyan!30, xshift=-.9cm, yshift=1.2cm] at (bill) {Math 2212};
\begin{pgfinterruptboundingbox}
\filldraw[gray!10!white] 
(0.460,1.140) .. controls (0.267, 1.102) and (-0.125,0.657) .. (0.289,0.261) .. controls (0.704,-0.135) and (2.863,0.130) .. (1.818,1.419) .. controls (0.980, 1.000) and ( 1.240,1.378) .. (0.46,0.55) -- cycle;
\end{pgfinterruptboundingbox}
\draw (1.29,1.82) -- (1.19,1.77) -- (1.1,1.74) -- (1,1.74);
\fill[green!50!brown!80!black, rotate around={15:(1,1.72)}] (1,1.72) ellipse (0.055 and 0.023);
\fill[green!50!brown!80!black, rotate around={18:(1.1,1.716)}] (1.1,1.716) ellipse (0.055 and 0.023);
\fill[green!50!brown!80!black, rotate around={45:(1.2,1.75)}] (1.2,1.75) ellipse (0.055 and 0.023);
\fill[green!50!brown!80!black, rotate around={70:(1.3,1.8)}] (1.3,1.8) ellipse (0.055 and 0.023);
\fill[green!50!brown!80!black, rotate around={-25:(1,1.76)}] (1,1.76) ellipse (0.055 and 0.023);
\fill[green!50!brown!80!black, rotate around={-25:(1.1,1.76)}] (1.1,1.76) ellipse (0.055 and 0.023);
\fill[green!50!brown!80!black, rotate around={-20:(1.19,1.79)}] (1.19,1.79) ellipse (0.055 and 0.023);
\fill[green!50!brown!80!black, rotate around={10:(1.27,1.84)}] (1.27,1.84) ellipse (0.055 and 0.023);
\end{tikzpicture}
 

\column{.5\textwidth}  
\centering

\large{\textbf{\textit{S.I. SESSION'S ARE AVAILABLE}}}\vspace{.2cm}

\small{\textit{Course\dotfill MATH 2212}\\}
\small{\textit{Professor\dotfill Dr. Math}\\}
\small{\textit{Time\dotfill 9am - 10:45am}\\}
\small{\textit{CRN Number\dotfill xxx}\\}\vspace{.2cm}
         
\textbf{S.I. Session: \textit{NE 0360} \\ Monday 4pm - 5pm\\\vspace{.2cm}}
\textbf{Q\&A Sesssion: \textit{NE 0360} \\ Tuesday 5pm - 6pm\\\vspace{.2cm}}
\textbf{S.I. Session: \textit{NE 0360} \\ Thursday 5pm - 6pm\\\vspace{.2cm}}

Instructor: \hfill xxx\\
E-Mail: \hfill xxx
\end{columns}
\end{frame}
\end{document}

在此处输入图片描述

答案2

不管怎样transform canvas={...}都是罪魁祸首。只是\begin{tikzpicture}[scale=0.75]运行正常。

其他变化:

  • 添加\hspace*{...}以更好地对齐两只鸭子。
  • 变成。\column{.5\textwidth}\begin{column}{.5\textwidth} ... \end{column}
\documentclass{beamer}
\setbeamerfont{title}{size=\Huge}
\usecolortheme{spruce}
\setbeamercolor{background canvas}{bg=white}
\setbeamertemplate{frametitle}[default][center]
\usepackage{tikzducks}


\begin{document}
\begin{frame}[plain]{\Large{Math 2212: Supplemental Instruction}}

\begin{columns}

\begin{column}{.5\textwidth}
\hfill
\begin{tikzpicture}[scale=.75]%
  \duck[glasses,think={Learn Math with me!}]
\end{tikzpicture}\hspace*{-.5cm}

\hspace*{-.5cm}\begin{tikzpicture}[scale=.75,xscale=-1]%
  \fill[green!50!brown!80!black, rotate around={-15:(0.47,1.88)}] (0.47,1.88) ellipse (0.055 and 0.023);
  \fill[green!50!brown!80!black, rotate around={15:(0.47,1.83)}] (0.47,1.83) ellipse (0.055 and 0.023);\duck[jacket=red!30!gray,think={Math 2212}]
  \begin{pgfinterruptboundingbox}
    \filldraw[gray!10!white]
      (0.460,1.140) .. controls (0.267, 1.102) and (-0.125,0.657) .. (0.289,0.261) .. controls (0.704,-0.135) and (2.863,0.130) .. (1.818,1.419) .. controls (0.980, 1.000) and ( 1.240,1.378) .. (0.46,0.55) -- cycle;
  \end{pgfinterruptboundingbox}
  \draw (1.29,1.82) -- (1.19,1.77) -- (1.1,1.74) -- (1,1.74);
  \fill[green!50!brown!80!black, rotate around={15:(1,1.72)}] (1,1.72) ellipse (0.055 and 0.023);
  \fill[green!50!brown!80!black, rotate around={18:(1.1,1.716)}] (1.1,1.716) ellipse (0.055 and 0.023);
  \fill[green!50!brown!80!black, rotate around={45:(1.2,1.75)}] (1.2,1.75) ellipse (0.055 and 0.023);
  \fill[green!50!brown!80!black, rotate around={70:(1.3,1.8)}] (1.3,1.8) ellipse (0.055 and 0.023);
  \fill[green!50!brown!80!black, rotate around={-25:(1,1.76)}] (1,1.76) ellipse (0.055 and 0.023);
  \fill[green!50!brown!80!black, rotate around={-25:(1.1,1.76)}] (1.1,1.76) ellipse (0.055 and 0.023);
  \fill[green!50!brown!80!black, rotate around={-20:(1.19,1.79)}] (1.19,1.79) ellipse (0.055 and 0.023);
  \fill[green!50!brown!80!black, rotate around={10:(1.27,1.84)}] (1.27,1.84) ellipse (0.055 and 0.023);
\end{tikzpicture}%
\end{column}

\begin{column}{.5\textwidth}  
  \centering
  
  \large{\textbf{\textit{S.I. SESSION'S ARE AVAILABLE}}}\vspace{.2cm}
  
  \small{\textit{Course\dotfill MATH 2212}\\}
  \small{\textit{Professor\dotfill Dr. Math}\\}
  \small{\textit{Time\dotfill 9am - 10:45am}\\}
  \small{\textit{CRN Number\dotfill xxx}\\}\vspace{.2cm}
           
  \textbf{S.I. Session: \textit{NE 0360} \\ Monday 4pm - 5pm\\\vspace{.2cm}}
  \textbf{Q\&A Sesssion: \textit{NE 0360} \\ Tuesday 5pm - 6pm\\\vspace{.2cm}}
  \textbf{S.I. Session: \textit{NE 0360} \\ Thursday 5pm - 6pm\\\vspace{.2cm}}
  
  Instructor: \hfill xxx\\
  E-Mail: \hfill xxx
\end{column}
\end{columns}
\end{frame}

\end{document}

在此处输入图片描述

相关内容