并排的图表中间有方程式吗?

并排的图表中间有方程式吗?

我想要做的是取 3-单纯形(四面体),并将 2-单纯形(三角形)放在四面体的右侧(最终有 3 个,但当然更小),但中间用 = 和一些 + 隔开,这样我就会得到如下内容:

四面体 = 三角形 + 三角形 + 三角形

我似乎无法正确定位,但我也不确定如何调整这些尺寸。

谢谢你的帮助。

\documentclass{article}

\usepackage{tikz}
\usepackage{tikz-3dplot}
\usepackage{tikz-cd}
\begin{document}
\begin{figure}[htb]
    \begin{subfigure}{.5\textwidth}
       \begin{tikzpicture}[line join = round, line cap = round]
\pgfmathsetmacro{\factor}{1/sqrt(2)};
\coordinate [label=left:$A$] (A) at (-3,0,-2*\factor);
\coordinate [label=right:$B$] (B) at (2,0,-2*\factor);
\coordinate [label=above:$C$] (C) at (0,3,1*\factor);
\coordinate [label=below:$D$] (D) at (0,-1.75,1.75*\factor);

\draw[-,dashed] (A)--(B);
\draw[-,thick] (A)--(C);
\draw[-,thick] (A)--(D);
\draw[-,thick] (B)--(C);
\draw[-,thick] (B)--(D);
\draw[-,thick] (C)--(D);
\end{tikzpicture}

        \caption{}
        \label{fig:1flower}
    \end{subfigure}

    \begin{subfigure}{.5\textwidth}
       \begin{tikzpicture}[line join = round, line cap = round]
\pgfmathsetmacro{\factor}{1/sqrt(2)};
\coordinate [label=left:$A$] (A) at (-3,0,-2*\factor);
\coordinate [label=right:$B$] (B) at (2,0,-2*\factor);
\coordinate [label=above:$C$] (C) at (0,3,1*\factor);

\draw[-,thick] (A)--(B);
\draw[-,thick] (A)--(C);
\draw[-,thick] (B)--(C);

\end{tikzpicture}
        \caption{}
        \label{fig:3 Simplex}
    \end{subfigure}
    \caption{\ref{fig:1Simplex}: $1$ Simplex; \ref{fig:3flower}: $3$ flowers}
\end{figure}
\end{document}

答案1

你真的需要子图吗?看看我非常简单的方法。也许这对你有帮助。

% arara: pdflatex

\documentclass{article}
\usepackage{tikz}
%\usepackage{subcaption} % not needed any more

\begin{document}
    \begin{figure}[htb]
            \begin{tikzpicture}[line join = round, line cap = round,scale=.4,baseline=(current bounding box.center)]
            \pgfmathsetmacro{\factor}{1/sqrt(2)};
            \coordinate [label=left:$A$] (A) at (-3,0,-2*\factor);
            \coordinate [label=right:$B$] (B) at (2,0,-2*\factor);
            \coordinate [label=above:$C$] (C) at (0,3,1*\factor);
            \coordinate [label=below:$D$] (D) at (0,-1.75,1.75*\factor);            
            \draw[-,dashed] (A)--(B);
            \draw[-,thick] (A)--(C);
            \draw[-,thick] (A)--(D);
            \draw[-,thick] (B)--(C);
            \draw[-,thick] (B)--(D);
            \draw[-,thick] (C)--(D);
            \end{tikzpicture} 
            = 
            \begin{tikzpicture}[scale=.3,line join = round, line cap = round,baseline=(current bounding box.center)]
            \pgfmathsetmacro{\factor}{1/sqrt(2)};
            \coordinate [label=left:$A$] (A) at (-3,0,-2*\factor);
            \coordinate [label=right:$B$] (B) at (2,0,-2*\factor);
            \coordinate [label=above:$C$] (C) at (0,3,1*\factor);           
            \draw[-,thick] (A)--(B);
            \draw[-,thick] (A)--(C);
            \draw[-,thick] (B)--(C);            
            \end{tikzpicture}
            +
            \begin{tikzpicture}[scale=.3,line join = round, line cap = round,baseline=(current bounding box.center)]
            \pgfmathsetmacro{\factor}{1/sqrt(2)};
            \coordinate [label=left:$A$] (A) at (-3,0,-2*\factor);
            \coordinate [label=right:$B$] (B) at (2,0,-2*\factor);
            \coordinate [label=above:$C$] (C) at (0,3,1*\factor);           
            \draw[-,thick] (A)--(B);
            \draw[-,thick] (A)--(C);
            \draw[-,thick] (B)--(C);            
            \end{tikzpicture}
            +
            \begin{tikzpicture}[scale=.3,line join = round, line cap = round,baseline=(current bounding box.center)]
            \pgfmathsetmacro{\factor}{1/sqrt(2)};
            \coordinate [label=left:$A$] (A) at (-3,0,-2*\factor);
            \coordinate [label=right:$B$] (B) at (2,0,-2*\factor);
            \coordinate [label=above:$C$] (C) at (0,3,1*\factor);           
            \draw[-,thick] (A)--(B);
            \draw[-,thick] (A)--(C);
            \draw[-,thick] (B)--(C);            
            \end{tikzpicture}
        \caption[Simplex and three flowers]{From left to right: Simplex and three flowers}
    \end{figure}
\end{document}

在此处输入图片描述

相关内容