
¿Cómo mover tcolorbox
el título del cuadro en primer plano (mover para colocarlo delante del cuadro)? Como puede ver en la captura de pantalla (rectángulo rojo, mis aspectos destacados), la cuadrícula se superpone al título, este comportamiento no es deseado.
\documentclass[]{article}
\usepackage[most]{tcolorbox}
\NewTColorBox{solution}{+O{}}{%
breakable,
enhanced,
sharpish corners,
colframe=blue!50,
colback=white,
coltitle=blue!50,
parbox = false,
fonttitle=\bfseries,
title={Solution},
attach boxed title to top center ={yshift=-\tcboxedtitleheight/2,yshifttext=-\tcboxedtitleheight/2},
halign title=flush center,
boxed title style={%
colback=white,
},
boxrule=0.5mm,top=0mm,bottom=0mm,
underlay={%
\draw[help lines,step=5mm,blue!20!white,shift={(interior.north west)}]
(interior.south west) grid (interior.north east);
},
lowerbox=ignored,
#1
}
\begin{document}
\begin{solution}
Some text
\end{solution}
\end{document}
Respuesta1
En underlay boxed title
lugar de underlay
la cuadrícula, se dibuja antes de agregar el título en cuadro, lo que hace que el título en cuadro aparezca en primer plano (consulte también la página 200 del tcolorbox
manual):
\documentclass[]{article}
\usepackage[most]{tcolorbox}
\NewTColorBox{solution}{+O{}}{%
breakable,
enhanced,
sharpish corners,
colframe=blue!50,
colback=white,
coltitle=blue!50,
parbox = false,
fonttitle=\bfseries,
title={Solution},
attach boxed title to top center ={yshift=-\tcboxedtitleheight/2,yshifttext=-\tcboxedtitleheight/2},
halign title=flush center,
boxed title style={%
colback=white,
},
boxrule=0.5mm,top=0mm,bottom=0mm,
underlay boxed title={%
\draw[help lines,step=5mm,blue!20!white,shift={(interior.north west)}]
(interior.south west) grid (interior.north east);
},
lowerbox=ignored,
#1
}
\begin{document}
\begin{solution}
Some text
\end{solution}
\end{document}