tcolorbox 中標題內的數學

tcolorbox 中標題內的數學

我正在編寫一個腳本來模擬帶有乳膠中的 tcolorbox 的 mathematica 筆記本。

只要標題中沒有等號,似乎就完全沒問題。如果我這樣做,它就會破裂

\begin{tcolorbox}[title=$a=b$,title filled]
\(a=5\)
\end{tcolorbox}

答案1

你需要括號:

\documentclass{article}

\usepackage{tcolorbox}

\begin{document}
\begin{tcolorbox}[title={$a=b$},title filled]
\(a=5\)
\end{tcolorbox}
\end{document}

在此輸入影像描述

相關內容