感谢论坛上某人的帮助,我终于可以在椭圆上写两个不同的字了。但是,现在我又遇到了椭圆形状的问题。椭圆的顶层总是只有一个单词,但在底层我有时必须一个接一个地写更多的单词,单词越多,椭圆就越像一个鸡蛋。有什么方法可以让 Latex 理解椭圆必须始终水平拉长吗?
\documentclass[a4paper,12pt]{article}
\usepackage[papersize={216mm,330mm},tmargin=20mm,bmargin=20mm,lmargin=20mm,rmargin=20mm]{geometry}
\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{positioning,shapes.multipart,shapes,fit}
\usepackage{hyperref}
\usepackage[fleqn]{amsmath}
\usepackage{array}
\usepackage{parskip}
\usepackage{float}
\renewcommand{\thesubsection}{\thesection.\alph{subsection}}
\setlength{\parindent}{0pt}
\tikzset{
basic/.style={
draw,
rectangle split,
rectangle split parts=2,
rectangle split part fill={blue!20,white},
text width=0.3\textwidth,
align=center,
font=\itshape
},
Ellipse/.style={
ellipse,
draw,
shape aspect=2,
inner sep=5pt,
text centered,
fill=blue!10!white,
font=\itshape
},
splitEllipse/.style={
draw,
fill=blue!10!white,
shape=ellipse split,
align=center,
minimum width=1cm,
inner sep=5pt,
}
}
\begin{document}
\begin{figure}[H]
\centering
\begin{tikzpicture}
[every node/.style={scale=0.6}]
\node[Ellipse,](Association 1){Association 1};
\node[splitEllipse, below= 0.5cm and 0.5cm of Association 1](Relation 7){Relation 7\\
\nodepart{lower}
A71 \\
A72\\
A73};
\end{tikzpicture}
\end{figure}
\end{document}