如何在Latex中畫這種根樹圖形?
在用Latex寫論文時需要如下形式的根樹,請問可以用某些宏包實現嗎?
方法很多。
用基本的 tikz 宏包就行。具體的宏包使用說明見 http://mirrors.ctan.org/graphics/pgf/base/doc/pgfmanual.pdf
粗暴點的就直接上坐標。% usepackage{tikz}
egin{tikzpicture}[line width = 1pt,
solid/.style = {circle, draw, fill = black, minimum size = 0.3cm},
empty/.style = {circle, draw, fill = white, minimum size = 0.3cm}]
ode [solid] (A) at (1,1) {};
ode [empty, label = right:$j_2$] (B) at (3,1) {};
ode [empty, label = right:$j_1$] (C) at (2,0) {};
draw (A) -- (C);
draw (B) -- (C);
end{tikzpicture}
% usepackage{tikz}
egin{tikzpicture}[grow"=up,
line width = 1pt,
vertex/.style={minimum size=2pt,fill,draw,circle},
open/.style={fill=none},
sibling distance=1.5cm,level distance=.75cm,
leaf/.style={label={[name=#1]right:$#1$}},auto]
ode [vertex, open, leaf = j_1] (root) {}
child {node[vertex] {}}
child {node[vertex,open, leaf = j_2] {}};
end{tikzpicture}
PSTricks也是可以的
推薦閱讀:
※這幾個iffalse和fi是什麼意思?
※lyx不能處理中文?
※LaTeX -> dvips -> ps2pdf 編譯不成功是為什麼?
※你在 TeX Stack Exchange 看到過哪些令人驚嘆的回答?
※在為知筆記本(wiz)里用 Latex 打黎曼曲率張量的那個R右下腳為什麼是扭曲的呢?
TAG:LaTeX | LaTeX排版與設計 |