
長方形なら簡単にできるのに、楕円を 2 つの部分に分割しようとしましたが (画像のように)、同じようには機能しないようです。どうすればいいでしょうか? (以下は試したコードです)
splitEllipse/.style={
ellipse split,
draw,
shape aspect=2,
inner sep=2pt,
text centered,
fill=blue!10!white,
font=\itshape
}
splitEllipse/.style={
ellipse split part=2,
draw,
shape aspect=2,
inner sep=2pt,
text centered,
fill=blue!10!white,
font=\itshape
}
これらのコードはどれも機能しません。
答え1
オプションの一部は図形には機能しませんellipse split
。
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.multipart}
\tikzset{
splitEllipse/.style={draw, fill=blue!10!white, shape=ellipse split, align=center, minimum width=6cm, inner sep=2pt}
}
\begin{document}
\begin{tikzpicture}
\node[splitEllipse]{upper text\nodepart{lower}lower text\\second line};
\end{tikzpicture}
\end{document}