我找不到在章节编号后写入章节文本的 tikz 代码的方法。非常感谢您的帮助
\documentclass[a4paper]{article}
\usepackage[margin=3cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage[spanish]{babel}
\usepackage{setspace}
%----------------------------------
\usepackage[x11names,table]{xcolor}
\usepackage{tikz}
\usepackage[framemethod=TikZ]{mdframed}
\usepackage{titlesec}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\fontfamily{phv}\selectfont
\newcommand{\caja} [1]{%
\begin{tikzpicture}
\node[fill=brown!20!, text width=.5\linewidth] (m) {#1};
\draw[rounded corners, line width=.5pt, lime]
(m.north west)--(m.north east)--(m.south east);
\draw[rounded corners, line width=1pt, green]
([yshift=3pt]m.north west)--([yshift=3pt, xshift=3pt]m.north east)--([xshift=3pt]m.south east);
\end{tikzpicture}
}%
\titleformat{\section}[hang]{\bfseries\large}{\footnotesize SECCIÓN \thesection. }{3pt}{\caja}
\section{Prueba}
\end{document}
我的代码所做的事情的图像,这不是我想要的,我希望它在一行上并跟在节号后面