パスワードを忘れた? アカウント作成
4069666 journal
日記

ujimushiの日記: あなたが知らない(かもしれない)PGF/TikZの世界

日記 by ujimushi

PGF/TikZをくまなく使おうとするとマニュアルには嘘くさい記述がいくつかある。

Tex WikiのTikZ Troubleshootingに書かれているdvipdfm(x)の制限事項は少なくともw32texのdvipdfmxにはあまりあてはまらない。

  1. In LATEX mode it uses graphicx for the graphics inclusion and does not support masking.→ 不明。というかpath pictureは使えているので問題ないのでは?
  2. In plain TEX mode it does not support image inclusion.←これは分かりません。
  3. For remembering of pictures (inter-picture connections) you need to use a recent version of pdftex running in DVI-mode.←これはtikzpicture間で座標を覚えて描画する機能で出来ません。確認済み。
  4. Patterns are not (cannot) be supported.←これは嘘です。使えます。patternsライブラリは機能します。
  5. Functional shadings are not (cannot) be supported. ←これも嘘です。使えます。shadows,shadingsライブラリは機能します。

他には、「rectangle node part」のrectangle split part align={center,flush right,flush left}の記述で実際にはこんな書き方では思ったように動かない。「every ほげほげ part/.style={align=…}」みたいに書くといいらしい。

参考http://tex.stackexchange.com/questions/41959/tikz-styles-that-set-nodepart-styles

\begin{tikzpicture}
  \node[draw,rectangle split,text width=3cm,rectangle split parts=3,
              every text node part/.style={align=center},
              every two node part/.style={align=right},
              every three node part/.style={align=left}]
    (A) at (0,0) { 真ん中 \nodepart{two} 右 \nodepart{three} 左};

  \node[draw,rectangle split,text width=3cm,rectangle split parts=3,
              rectangle split part align={center,right,left}]
    at ([xshift=5cm] A) { 真ん中 \nodepart{two} 右 \nodepart{three} 左};
\end{tikzpicture}

もう一つは「\lastx\foreachのremember=…」の扱い方で、必ず「...」にしないといけないとか。
下の例では、a→b→c→d→e→fはうまくいってるが、A→B→C→D→E→Fとはなっていない。

  \begin{tikzpicture}
    \foreach \x/\y in {1/a,2/b,3/c,4/d,5/e,6/f} {\node[draw] (\y) at (\x,1) {\y};};
    \foreach \x [remember=\x as \lastx (initially a)] in {b,...,f} {\draw[->] (\lastx) -- (\x);};

    \foreach \x/\y in {1/A,2/B,3/C,4/D,5/E,6/F} {\node[draw] (\y) at (\x,0) {\y};};
    \foreach \x [remember=\x as \lastx (initially A)] in {B,C,...,F} {\draw[->] (\lastx) -- (\x);};
  \end{tikzpicture}

この議論は賞味期限が切れたので、アーカイブ化されています。 新たにコメントを付けることはできません。
typodupeerror

ソースを見ろ -- ある4桁UID

読み込み中...