请帮我在 tcolorbox 中设置居中、加粗、较大的字体大小标题:
母语:
\documentclass{book}
\usepackage[most]{tcolorbox}
\begin{document}
\begin{tcolorbox}[colback=black!5,
colframe=black!5,
title={Top Title},
coltitle=black,
fonttitle=\bfseries\Large,
sharp corners,
enhanced,
breakable,
]
My box.
\end{tcolorbox}
\end{document}
答案1
halign title
确定标题的水平对齐方式。
\documentclass{book}
\usepackage[most]{tcolorbox}
\begin{document}
\begin{tcolorbox}[colback=black!5,
colframe=black!5,
title={Top Title},
coltitle=black,
fonttitle=\bfseries\Huge,
halign title=flush center,
sharp corners,
enhanced,
breakable,
]
My box.
\end{tcolorbox}
\end{document}