[Tex/LaTex] tcolorbox title on top and on bottom with centered text

frame-titletcolorbox

I want to put a title at the bottom right of the frame and still have normal title on the top left.

My hack solution of using \tcbsubtitle[after={\vspace*{-34pt}}]{} seems to work but it messes up the valign=center for the box content:

enter image description here

So, what is the correct way to have both titles as well as having text vertically centered in the box.

Code:

\documentclass{article}
\usepackage[many]{tcolorbox}

\begin{document}
    \begin{tcolorbox}[
        title={Top Title},
        halign=center,
        valign=center,
        nobeforeafter,
        height=3cm,
    ]
        Some text%
        \tcbsubtitle[after={\vspace*{-34pt}}]{\hfill End-Title}% <-- Note: \vspace hack!
    \end{tcolorbox}%
\end{document}

Best Answer

It seems that using the lowerpart as a subtitle is the only solution. The subtitle is a new colorbox inside the colorbox. In the tcolorbox documentation at page 22 is written that "upperpart is mandatory" so it cannot be suppressed. I came up with a similar solution:

\documentclass{article}
\usepackage[many]{tcolorbox}
\begin{document}
    \begin{tcolorbox}[space to upper,
        skin=bicolor,
        colbacklower=black!75,
        collower=white,
        title={Top Title},
        halign=center,
        valign=center,
        nobeforeafter,
        halign lower=flush right,
        bottom=0mm,
        height=3cm
    ]
        Some text 3cm%

        \tcblower
        End-Title
    \end{tcolorbox}%

     \begin{tcolorbox}[space to upper,
        skin=bicolor,
        colbacklower=black!75,
        collower=white,
        title={Top Title},
        halign=center,
        valign=center,
        nobeforeafter,
        halign lower=flush right,
        bottom=0mm,
        height=6cm
        ]
        Some text 6cm%

        \tcblower
        End-Title
     \end{tcolorbox}%

\end{document}

enter image description here