1

Is there an option key for aligning subtitles in tcolorbox? I do not see it in the package manual. The best I can do is: \tcbsubtitle{\centering{My centered subtitle}}. I am looking for a way to define it in \tbcset options.

1 Answer 1

1

Try with subtitle style={halign=center}.

enter image description here

\documentclass{article}
\usepackage{tcolorbox}
\tcbset{subtitle style={halign=center}}
\begin{document}
\begin{tcolorbox}[title=My title]
\tcbsubtitle{My subtitle}
Further text.
\end{tcolorbox}
\end{document}

Unrelated note: \centering is not a macro that takes an argument, so it should be used as {\centering ..}, not \centering{..}.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.