質問

あなたが見ているなら http://www.texample.net/tikz/examples/boxes-with-text-and-math/ 丸い角にある箱があります。例では、ボックス自体とタイトルの両方がボックスです。タイトルボックスにボトムコーナーが丸くないようにしたいです。

120ページの マニュアル, 、丸い角の有無にかかわらず描画する方法の説明があります。ただし、これをFancyTitleで使用したいと思います。箱自体と同じくらい広いときにすべての角が丸くなるボックスのようにファンシータイトルを持っているのは少しばかげているように見えます。

  \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]
役に立ちましたか?

解決

おそらく、(問題を解決しない)効果を実現する最も簡単な方法は次のとおりです。

追加 name=title タイトルノードに。

次に、タイトルノードの下部に沿って行を描きます。

\draw [draw=red,line width=2pt] (title.south west) -- (title.south east);

これにより、撮影上の線が2つの小さなスポットが与えられ、これを修正することができます。

\usetikzlibrary{calc}

そして、動き、各端でライン1ポイントを短くし、少し上にします。
\draw [draw=red,line width=2pt] ($(title.south west)+(+1pt,+1pt)$) -- ($(title.south east)+(-1pt,+1pt)$) ;

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top