I'm trying to reproduce this box but with a title box placed on the top right and slightly rotated.
I am not satisfied with the results: the right and left border rules are not very parallel and the corners are not rounded in the same way. Can you help me please ?
% code
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{tikz,tikzpagenodes}
\usepackage[most]{tcolorbox}
\usetikzlibrary{calc}
\usetikzlibrary{intersections, patterns}
\tcbuselibrary{skins}
\usepackage{lipsum}
\usepackage{xcolor,etoolbox}
\definecolor{titlecolor}{RGB}{199,232,250}
\newcommand{\titlecurve}{
\fill[titlecolor,ultra thick]
($(title.south west) +(-1pt,-1pt)$) -- ($(title.north west)+(0pt,-1pt)$) coordinate(A)
to[curve to,out=90,in=180] ($(A)+(5pt,5pt)$)
-- ($(title.north east)+(-5pt,0pt)$) coordinate(B)
to[curve to,out=0,in=90] ($(B)+(6pt,-5pt)$) coordinate(C)
--($(C)+(-0.5pt,-5pt)$) coordinate(D)
to[curve to,out=-90,in=0] ($(D)+(-5pt,-10pt)$) coordinate(F)
-- cycle;
}
\newtcolorbox{oenv}{
enhanced,
boxrule=3pt,
title=Temp title,%
colframe=titlecolor,
colback=white,
coltitle=red,
attach boxed title to top right={xshift=10pt, yshift=1pt},
boxed title style={empty},
underlay boxed title=\titlecurve
}
\begin{document}
\begin{oenv}
Let $f$ be defined by
\end{oenv}
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End: