在 Beamer 中怎样才能写出像这样的图片?

在 Beamer 中怎样才能写出像这样的图片?

你知道我们在 Beamer 中如何做到这一点吗?提前谢谢您。在此处输入图片描述

答案1

另一个带有循环的(压缩)解决方案foreach

\documentclass{standalone}
\usepackage[x11names]{xcolor}
\usepackage{tikz}
\usetikzlibrary{positioning}

\begin{document}
    \begin{tikzpicture}
    \coordinate (L0) at (0, 0);
    \foreach \lettre/\couleur/\texte/\ancre [count=\li, evaluate={\lj=\li-1}] in {
        M/red/Matrix theory/130, A/Gold1/Algebra/90, T/Green3/Trigonometry/130,
        H/Cyan1/Hilbert space/120, E/HotPink1/Ergodicity/90, M/black/{Measure\\ theory}/90,
        A/HotPink1/Analysis/90, T/Cyan1/Topology/80, I/Green3/Integration/80,
        C/Gold1/{Complex\\ number}/80, S/red/Set theory/80
    }
    {
        \node (L\li) [right=2ex of L\lj]  {\lettre};
        \pgfmathsetmacro\y{-abs(\li-6)*.5-1};
        \path [draw=\couleur, line width=1.5pt, fill=\couleur] (L\li.south) --++(0, \y cm)
            circle [radius=2pt] node[anchor=\ancre, \couleur, align=center, font={\tiny\sffamily}] {\texte};
    }
    \end{tikzpicture}
\end{document}

在此处输入图片描述

答案2

数学

硬编码示例,允许轻松更改(颜色、定位、字体等)。它还很好地说明了高斯配对。编码可以更紧凑、更优雅,例如使用样式。

平均能量损失

\documentclass[12pt]{article}


\usepackage{tikz}
\usetikzlibrary{positioning}

\begin{document}
\begin{tikzpicture}
\matrix[column sep=3mm,row sep=4mm]
{
\node (L1) {\Large M}; &
\node (L2){\Large A}; &
\node (L3){\Large T}; &
\node (L4){\Large H}; &
\node (L5){\Large E}; &
\node (L6){\Large M}; &
\node (L7){\Large A}; &
\node (L8){\Large T}; &
\node (L9){\Large I}; &
\node (L10){\Large C}; &
\node (L11){\Large S}; 
 \\
%
&&&&&&&&&&&
\\
%
&&&&&\node (blank1){} ; &&&&&&
\\
%
&&&&& \node (c6)[circle,fill=black]{} ; 
&&
 & & & &
\\
%
&&&& \node (c5)[circle,fill=pink]{} ; 
&&
\node (c7)[circle,fill=pink]{} ; & & & & &
\\
%
&&& \node (c4)[circle,fill=blue]{} ; 
&&&&
\node (c8)[circle,fill=blue]{} ; & & & &
\\
%
&& \node (c3)[circle,fill=green]{} ; 
&&&&&&
\node (c9)[circle,fill=green]{} ; & & &
\\
%
& \node (c2)[circle,fill=yellow]{} ; 
&&&&&&&&
\node (c10)[circle,fill=yellow]{} ; & &
\\
%
\node (c1)[circle,fill=red]{} ; &
&&&&&&&&&
\node (c11)[circle,fill=red]{} ; &
\\
};
%
\draw [thick,red] (c1) -- (L1);
\draw [thick,red] (c11) -- (L11);
%
\draw [thick,yellow] (c2) -- (L2);
\draw [thick,yellow] (c10) -- (L10);
%
\draw [thick,green] (c3) -- (L3);
\draw [thick,green] (c9) -- (L9);
%
\draw [thick,blue] (c4) -- (L4);
\draw [thick,blue] (c8) -- (L8);
%
\draw [thick,pink] (c5) -- (L5);
\draw [thick,pink] (c7) -- (L7);
%
\draw [thick,black] (c6) -- (L6);
%
\node (label1)[scale=0.75,below=of c1,yshift=13mm] {Matrix theory};
\node (label2)[scale=0.75,below=of c2,yshift=13mm] {Algebra};
\node (label3)[scale=0.75,below=of c3,yshift=13mm,xshift=1em] {Trigonometry};
\node (label4)[scale=0.75,below=of c4,yshift=13mm,xshift=1em] {Hilbert space};
\node (label5)[scale=0.75,below=of c5,yshift=13mm,xshift=1em] {Ergodicity};
\node (label6)[scale=0.75,below=of c6,yshift=13mm,align=center] {Measure\\ theory};
\node (label7)[scale=0.75,below=of c7,yshift=13mm] {Analysis};
\node (label8)[scale=0.75,below=of c8,yshift=13mm] {Topology};
\node (label9)[scale=0.75,below=of c9,yshift=13mm] {Integration};
\node (label10)[scale=0.75,below=of c10,yshift=13mm,align=right] {Complex\\ number};
\node (label11)[scale=0.75,below=of c11,yshift=13mm] {Set theory};

\end{tikzpicture}

\end{document}

答案3

看一眼蒂克兹,LaTeX 最强大的创建图形元素的工具。

本教程应该可以帮助你入门。

Beamer 更适合创建演示幻灯片,据我所知,它对于创建复杂的图形没用。

相关内容