벤 다이어그램의 곡선을 따르도록 텍스트를 구부리는 방법

벤 다이어그램의 곡선을 따르도록 텍스트를 구부리는 방법

"클래스 A", "클래스 B", "클래스 C"가 이를 포함하는 원의 곡선을 즉시 따르도록 해야 합니다.

\documentclass{article}

\usepackage[english]{babel}

\usepackage[utf8]{inputenc}

\usepackage{amsmath}

\usepackage{tikz}

\usetikzlibrary{arrows.meta}
\usetikzlibrary{decorations.text}

\begin{document}

\begin{tikzpicture}[scale=0.85]
\foreach \X [count=\Y starting from 2] in {\textit{A},\textit{B},\textit{C}}
{\draw (-\Y,-\Y/2) circle ({1.5*\Y} and \Y);
\node at (1-2*\Y,-1.1*\Y) {$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $  $ $   classes \X}; }
\draw ([xshift=-0.5cm,yshift=-0.5cm]current bounding box.south west)
rectangle ([xshift=0.5cm,yshift=0.5cm]current bounding box.north east);
\node[anchor=south] at (current bounding box.north) {\textbf{Three classes}};
\end{tikzpicture}


\end{document}

답변1

이 같은?

\documentclass{article}

\usepackage[english]{babel}

\usepackage[utf8]{inputenc}

\usepackage{amsmath}

\usepackage{tikz}

\usetikzlibrary{arrows.meta} 
\usetikzlibrary{decorations.text}

\begin{document}

\begin{tikzpicture}[scale=0.85] 
\foreach \X [count=\Y starting from 2] in 
{A,B,C} 
{\draw (-\Y,-\Y/2) circle ({1.5*\Y} and \Y);
\path[decoration={text along path,
text={classes |\itshape|\X},text align=center,raise=0.2em},decorate] (-\Y,-\Y/2) +(-1.5*\Y,0) arc(180:360:{1.5*\Y} and \Y);
} 
\draw ([xshift=-0.5cm,yshift=-0.5cm]current bounding box.south west) 
rectangle ([xshift=0.5cm,yshift=0.5cm]current bounding box.north east); 
\node[anchor=south] at (current bounding box.north) {\textbf{Three classes}}; 
\end{tikzpicture}

\end{document}`

여기에 이미지 설명을 입력하세요

관련 정보