[Tex/LaTex] Position tcolorbox in an absolute manner

positioningtcolorbox

I'd like to position a tcolorbox in an absolute manner, like in tikz option remember picture, overlay, with something like "please put the center of the box at the center of the page". What is the easiest way to achieve that ?

Thank you !

MWE:

\documentclass{article}
\usepackage{tcolorbox}
\tcbuselibrary{skins}
\begin{document}
\begin{tcolorbox}[width=4cm]%%
  Hi everyone
\end{tcolorbox}
\end{document}

Best Answer

You can wrap it into a tikz node.

\documentclass{article}
\usepackage{tcolorbox}
\tcbuselibrary{skins}
\begin{document}
\tikz[overlay, remember picture] \node at (current page.center) {
\begin{tcolorbox}[width=4cm]%%
  Hi everyone
\end{tcolorbox}
};
\end{document}
Related Question