Closed tthuem closed 2 years ago
There is a simple fix to that. tcolorbox does this because even though the title appears to be empty it really isn't due to the inserted \setlength{\parskip}{0ex}\vphantom{/}
at the beginning of every title. Just move this part to before title
- a key which is only executed if there is a title.
For example, the definition for the macro \mydefinition
\newcommand{\mydefinition}[2]{
\begin{tcolorbox}[title={\setlength{\parskip}{0ex}\vphantom{/}#1},colback=orange!10,colframe=orange!30,coltitle=black,fonttitle=\bfseries,left=1mm,right=1mm,top=1mm,bottom=1mm]
#2
\end{tcolorbox}
}
should become
\newcommand{\mydefinition}[2]{
\begin{tcolorbox}[title={#1},before title={\setlength{\parskip}{0ex}\vphantom{/}},colback=orange!10,colframe=orange!30,coltitle=black,fonttitle=\bfseries,left=1mm,right=1mm,top=1mm,bottom=1mm]
#2
\end{tcolorbox}
}
I already added this fix to #31.
In general, i would recommend using tcbset
in order to avoid duplicating all those title=...,colback=...
lines over and over again.
Benno, could you apply that change?
I applied the fix in 1a4c2a573633197781cc56df56abd8de9c644560.
On the left is the current rendering, whereas the rendering of my old template is shown on the right.