\documentclass[UTF8]{ctexbook}
\usepackage{titletoc}%toc:table of content
\usepackage{titlesec}
\usepackage{xcolor}
\usepackage{pagecolor}
\usepackage{layout}%布局
\usepackage{multicol}%多栏排版宏包
\usepackage{geometry}%布局宏包
\usepackage{hyperref}%引入 hyperref 宏包以支持超链接
\usepackage{nameref}
\usepackage{tikz}
\usepackage{lipsum} % 用于生成示例文本
\pgfdeclarelayer{diyituceng}
\pgfdeclarelayer{diertuceng}
\pgfsetlayers{diyituceng,main,diertuceng}
%In pgf layers are referenced using names. The standard layer, which is a bit special in certain ways, is called main. If nothing else is specified, all graphic commands are added to the main layer. You can declare a new layer using the following command:
\usetikzlibrary{shapes.geometric}
\newcommand{\tuoyvan}[1]{%椭圆
\begin{pgfonlayer}{diertuceng}
\node[ellipse, draw, fill=white, inner sep=2pt, anchor=center] (ellipse) at (0,0) {#1};
\end{pgfonlayer}
}%
\newcommand{\jvxing}[1]{%矩形
\begin{pgfonlayer}{diyituceng}
\node[anchor=north west, text width=\linewidth, align=center, fill=white, draw] (title) at ([xshift=-30pt]ellipse.center) {#1};
\end{pgfonlayer}
}%
%椭圆镶嵌矩形
\titleformat{\section}[block]%
{\normalfont\Large\bfseries\begin{tikzpicture}[baseline=(ellipse.base)]}%
{\tuoyvan{\thesection}}%
{0pt}%
{\jvxing}%
[\end{tikzpicture}]%
%before-code
%after-code
%\titleformat{command}[shape]{format}{label}{sep}{before}[after]
\begin{document}
\section{第一节}
\end{document}
完美
问 怎么用tcolorbox 宏包制作含有ellipsoid形状标题盒子