如果您看一看http://www.texample.net/tikz/examples/boxes-with-text-and-math/,那麼框中有圓角。在這些例子中,盒子本身和標題都是一個盒子。我希望標題框沒有四捨五入的底角。如何只使用Tikz在一個花式框中舍入選定的角落
在manual的第120頁中,描述瞭如何使用和不使用圓角進行繪製。但是,我想用這個花哨的標題。看起來有點愚蠢的是,將花哨的標題當作一個盒子,當盒子的寬度和盒子本身一樣寬時,所有的角落都是圓形的。
\begin{tikzpicture}[baseline=-2cm]
\node [mybox] (box){
\begin{minipage}[t!]{0.50\textwidth}
Help, I'm a box
\end{minipage}
};
\node[fancytitle, text width=0.5423\textwidth, text centered, rounded corners] at (box.north) {Help, I'm a title};
\end{tikzpicture}
我使用的風格是這個
\tikzstyle{mybox} = [draw=red, fill=blue!20, very thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]
\tikzstyle{fancytitle} = [fill=red, text=white]
您的意思是說,您希望標題框的頂部2個角是圓角的,但兩個底角是方形的嗎? – 2010-06-06 12:51:18
是的,我希望標題框的上角四捨五入。 – 2010-06-06 13:37:28