第二部分:使用 TikZ 制作图形

第二部分:使用 TikZ 制作图形

我有与 MWE 一起出现的图形集:

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}
    \centering
    \setbox1=\hbox{\includegraphics[height=2cm]{example-image-b}}
    \includegraphics[height=2cm]{example-image-b}\llap{\raisebox{-1cm}{\includegraphics[height=1cm]{example-image-c}}}\llap{\makebox[\wd1][l]{\raisebox{2cm}{\includegraphics[height=1cm]{example-image-c}}}}\llap{\raisebox{2cm}{\includegraphics[height=1cm]{example-image-c}}}\llap{\makebox[\wd1][l]{\raisebox{-1cm}{\includegraphics[height=1cm]{example-image-c}}}}\llap{\makebox[4cm][l]{\raisebox{2cm}{\includegraphics[height=1cm]{example-image-c}}}}\llap{\makebox[4cm][l]{\raisebox{1cm}{\includegraphics[height=1cm]{example-image-c}}}}\llap{\makebox[4cm][l]{{\includegraphics[height=1cm]{example-image-c}}}}\llap{\makebox[4cm][l]{\raisebox{-1cm}{\includegraphics[height=1cm]{example-image-c}}}}
    \includegraphics[height=2cm]{example-image-a}\llap{\raisebox{2cm}{\includegraphics[height=1cm]{example-image-c}}}\llap{\makebox[\wd1][l]{\raisebox{2cm}{\includegraphics[height=1cm]{example-image-c}}}}\llap{\raisebox{-1cm}{\includegraphics[height=1cm]{example-image-c}}}\llap{\makebox[\wd1][l]{\raisebox{-1cm}{\includegraphics[height=1cm]{example-image-c}}}}\llap{\makebox[0cm][l]{\raisebox{-1cm}{\includegraphics[height=1cm]{example-image-c}}}}\llap{\makebox[0cm][l]{{\includegraphics[height=1cm]{example-image-c}}}}\llap{\makebox[0cm][l]{\raisebox{1cm}{\includegraphics[height=1cm]{example-image-c}}}}\llap{\makebox[0cm][l]{\raisebox{2cm}{\includegraphics[height=1cm]{example-image-c}}}}
    \caption{My caption.}
\end{figure}
\end{document}

像这样,

在此处输入图片描述

现在我想创建类似的东西(最好通过基于 tikz 的解决方案):

在此处输入图片描述

这是该问题的延续:图像的开头:人物围绕人物

答案1

可能性有无数种。以下是其中一种。

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}
\matrix [matrix of nodes,nodes={inner sep=0pt}] (mat) {
\includegraphics[height=1cm]{example-image-c} &
\includegraphics[height=1cm]{example-image-c} &
\includegraphics[height=1cm]{example-image-c} & 
\includegraphics[height=1cm]{example-image-c} &
\includegraphics[height=1cm]{example-image-c} &
\includegraphics[height=1cm]{example-image-c} \\ 
\includegraphics[height=1cm]{example-image-c} &
\includegraphics[height=1cm]{example-image-c} &
\includegraphics[height=1cm]{example-image-c} & 
\includegraphics[height=1cm]{example-image-c} &
\includegraphics[height=1cm]{example-image-c} &
\includegraphics[height=1cm]{example-image-c} \\ 
\includegraphics[height=1cm]{example-image-c} &
\includegraphics[height=1cm]{example-image-c} &
\includegraphics[height=1cm]{example-image-c} & 
\includegraphics[height=1cm]{example-image-c} &
\includegraphics[height=1cm]{example-image-c} &
\includegraphics[height=1cm]{example-image-c} \\ 
\includegraphics[height=1cm]{example-image-c} &
\includegraphics[height=1cm]{example-image-c} &
\includegraphics[height=1cm]{example-image-c} & 
\includegraphics[height=1cm]{example-image-c} &
\includegraphics[height=1cm]{example-image-c} &
\includegraphics[height=1cm]{example-image-c} \\ 
};
\node at (barycentric cs:mat-2-2=1,mat-2-3=1,mat-3-2=1,mat-3-3=1)
{\includegraphics[height=2cm]{example-image-a}};
\node at (barycentric cs:mat-2-4=1,mat-2-5=1,mat-3-4=1,mat-3-5=1)
{\includegraphics[height=2cm]{example-image-b}};
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容