带有方程式和 tikzpicture 的调整框

带有方程式和 tikzpicture 的调整框

我想在调整框内的 tikzpicture 顶部写一个等式,但是我得到了这个(我只写了一个等式):

在此处输入图片描述

MWE 如下:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{setspace}
\usepackage{outlines}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{adjustbox}
\usepackage{blindtext}
\usepackage[margin=0.8in]{geometry}
\usepackage{tikz}
  \def\firstcircle{(90:1.75cm) circle (2.5cm)}
  \def\secondcircle{(210:1.75cm) circle (2.5cm)}
  \def\thirdcircle{(330:1.75cm) circle (2.5cm)}

\begin{document}

\begin{minipage}{\linewidth}\begin{outline}\1[$\blacktriangleright$]\emph{\textbf{aTitle}}:
\1[] \blindtext:

\begin{adjustbox}{width=5cm}
$ A \cup (B\cap C) = (A\cup B) \cap (A\cup C) $

 \begin{tikzpicture}
    \begin{scope}
        \clip \secondcircle;
        \thirdcircle;
    \end{scope}
    \begin{scope}
        \clip \firstcircle;
        \thirdcircle;
    \end{scope}
        \draw \firstcircle node[text=black,above] {$A$};
        \draw \secondcircle node [text=black,below left] {$B$};
        \draw \thirdcircle node [text=black,below right] {$C$};
\end{tikzpicture}
\end{adjustbox}
\begin{adjustbox}{width=5cm}
 \begin{tikzpicture}
    \begin{scope}
        \clip \secondcircle;
        \thirdcircle;
    \end{scope}
    \begin{scope}
        \clip \firstcircle;
        \thirdcircle;
    \end{scope}
        \draw \firstcircle node[text=black,above] {$A$};
        \draw \secondcircle node [text=black,below left] {$B$};
        \draw \thirdcircle node [text=black,below right] {$C$};
\end{tikzpicture}
\end{adjustbox}
\begin{adjustbox}{width=5cm}
 \begin{tikzpicture}
    \begin{scope}
        \clip \secondcircle;
        \thirdcircle;
    \end{scope}
    \begin{scope}
        \clip \firstcircle;
        \thirdcircle;
    \end{scope}
        \draw \firstcircle node[text=black,above] {$A$};
        \draw \secondcircle node [text=black,below left] {$B$};
        \draw \thirdcircle node [text=black,below right] {$C$};
\end{tikzpicture}
\end{adjustbox}
\end{outline}\end{minipage}

\end{document}

答案1

简单的解决方案:

\begin{adjustbox}{width=5cm}
 \begin{tikzpicture}
        \node at (90:3) {$ A \cup (B\cap C) = (A\cup B) \cap (A\cup C) $};
        \node[draw,circle,minimum size=3cm,inner sep=0pt] (c1) at (90:1) {};
        \node at (110:2) {$A$};
        \node[draw,circle,minimum size=3cm,inner sep=0pt] (c2) at (210:1) {};
        \node at (210:2) {$B$};
        \node[draw,circle,minimum size=3cm,inner sep=0pt] (c3) at (330:1) {};
        \node at (330:2) {$C$};
\end{tikzpicture}
\end{adjustbox}

答案2

您可以将等式放在第一个A圆圈下方,例如,如下所示:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{setspace}
\usepackage{outlines}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{adjustbox}
\usepackage{blindtext}
\usepackage[margin=0.8in]{geometry}
\usepackage{tikz}
\usetikzlibrary{positioning}
  \def\firstcircle{(90:1.75cm) circle (2.5cm)}
  \def\secondcircle{(210:1.75cm) circle (2.5cm)}
  \def\thirdcircle{(330:1.75cm) circle (2.5cm)}

\begin{document}

\begin{minipage}{\linewidth}
\begin{outline}\1[$\blacktriangleright$]\emph{\textbf{a Title}}:
\1[] \blindtext:
%
\begin{center}
\begin{adjustbox}{width=5cm}
 \begin{tikzpicture}
    \begin{scope}
        \clip \secondcircle;
        \thirdcircle;
    \end{scope}
    \begin{scope}
        \clip \firstcircle;
        \thirdcircle;
    \end{scope}
        \draw \firstcircle node(A)[text=black,above] {$A$};
        \draw \secondcircle node [text=black,below left] {$B$};
        \draw \thirdcircle node [text=black,below right] {$C$};
   \node [below=of A] {$ A \cup (B\cap C) = (A\cup B) \cap (A\cup C) $};
\end{tikzpicture}
\end{adjustbox}
\begin{adjustbox}{width=5cm}
 \begin{tikzpicture}
    \begin{scope}
        \clip \secondcircle;
        \thirdcircle;
    \end{scope}
    \begin{scope}
        \clip \firstcircle;
        \thirdcircle;
    \end{scope}
        \draw \firstcircle node[text=black,above] {$A$};
        \draw \secondcircle node [text=black,below left] {$B$};
        \draw \thirdcircle node [text=black,below right] {$C$};
\end{tikzpicture}
\end{adjustbox}
\begin{adjustbox}{width=5cm}
 \begin{tikzpicture}
    \begin{scope}
        \clip \secondcircle;
        \thirdcircle;
    \end{scope}
    \begin{scope}
        \clip \firstcircle;
        \thirdcircle;
    \end{scope}
        \draw \firstcircle node[text=black,above] {$A$};
        \draw \secondcircle node [text=black,below left] {$B$};
        \draw \thirdcircle node [text=black,below right] {$C$};
 \end{tikzpicture}
\end{adjustbox}
\end{center}
\end{outline}
\end{minipage}

\end{document}

在此处输入图片描述

相关内容