I tried to do a box with round corners and a title with tikz to do some definitions, properties,...
I tried this
\tikzset{mybox/.style={draw=black, thick,rectangle, rounded corners, inner sep=10pt, inner ysep=10pt}}
\tikzset{titlebox/.style={fill=white, text=black,thick,draw=black}}
\newcommand{\tikzboxb}[2]{%
\begin{tikzpicture}%
\node[mybox] (box){%
\begin{minipage}{0.96\linewidth}%
#2%
\end{minipage} };%
\node[titlebox] at (box.north west) {%
#1%
};%
\end{tikzpicture}%
}
\begin{document}
\tikzboxb{Propriété}{
\begin{center}
\begin{tikzpicture}[scale=0.3]
\draw (0,0)--(8,1)--(4,5)--cycle;
\end{tikzpicture}
\end{center}
}
and even this
\begin{tikzpicture}%
\begin{minipage}{0.96\linewidth}%
\begin{tikzpicture}[scale=0.3]
\draw (0,0)--(8,1)--(4,5)--cycle;
\end{tikzpicture}
\end{minipage} };%
\node[fill=white, text=black,thick,draw=black , right=10pt] at (box.north west) {Propriété};%
\end{tikzpicture}
The result is
In both case there is a problem. In the first case, the box doesn't look like I want which is the case with the second test.
In both case the triangle s have round corners !
It seems that the style I defined for the node (and only for It) was used for all the drawings.
I tried so many changes that I am exhausted and I need some help.
Thanks, Benoît



tikzpictures is to be avoided, it is probably part of your problem. 2 - You may not know about it but thetcolorboxpackage proposes a very easy way to achieve what you want ;). 3 - In general on this site, it is better to post compilable codes so that people can reproduce you issue easily without having to guess the packages / parameters you use ! Hope this helps – BambOo Sep 25 '18 at 09:33