我希望能够在这个色彩缤纷的 tikz 图像中写简单的文字、数学和文本。我希望能够选择文本颜色、对齐文本,并能够在矩形窗格内为文本添加阴影。
我拥有的
\documentclass[border=1cm]{standalone}
\usepackage[dvipsnames]{xcolor}
\usepackage{newtxtext}
\usepackage{tikz}
\usetikzlibrary{decorations.text, fadings}
\tikzfading[name=fade out,
inner color=transparent!0,
outer color=transparent!5]
\begin{document}
\begin{tikzpicture}
% slant rectangle
\shade[shading=ball, ball color = gray!10,rotate=30] (3.2,2.8) -- ++ (2.5,0) to[bend right] ++ (0.65,0.4) --++ (-.05,-1.4) to[bend right] ++ (-0.65,0.4) -- ++ (-2.5,0) -- cycle;
%% small circles
\shade[shading=ball, ball color = gray!10] (1.5,3.75) circle (0.4cm);
\fill[Cyan] (1.5,3.75) circle (0.2cm);
%%% Big Rectangles
\shade[shading=ball, ball color = gray!10, rounded corners=10] (5.0,4.4) rectangle (11.6,7.6);
\fill[Cyan,rounded corners=10] (4.8,4.8) rectangle (11.3,7.3);
%% big circles
\shade[shading=ball, ball color = gray!10] (5.5,6) circle (1.6);
\fill [Cyan](5.5,6) circle (0.9cm);
\end{tikzpicture}
\end{document}
我想要的是
答案1
只需添加带有文本的节点!例如,带有此节点的片段是:
%%% Big Rectangles
\shade[shading=ball, ball color = gray!10, rounded corners=10] (5.0,4.4)
rectangle (11.6,7.6);
\fill[Cyan,rounded corners=10] (4.8,4.8) rectangle (11.3,7.3)
node[text width=38mm, align=left, % <--- added
font=\small\sffamily, text=black,
below left]
{{\large\itshape\textbf{Heading}}\\
This is a description of what I want to do.
I also want to include math:\\
$a^2+b^2=c^2$
} ;
文本的样式我留给你了:-)