TeX - LaTeX Asked by ste2239 on April 19, 2021
I am trying to draw something like this
using the forest package:
Thank you all in advance!
Depending on how many of these you have, this solution may do what you want. Adjusting the position of the brace and its label is a bit of trial and error. I don't know if there's a way to make this more automatic.
documentclass{article}
usepackage{forest}
usetikzlibrary{decorations.pathreplacing,calc}
forestset{solid nodes/.style={for tree={circle,draw,inner sep=1,fill=black}},
dir/.style={for tree={grow=#1}},
leaf/.style={label=$#1$},
mytree/.style={solid nodes, for tree={grow=north,s sep=1cm}}}
begin{document}
begin{forest}mytree
[[
[,dir=north east
[,leaf=mu,name=X] [,leaf=mu,name=Y] [,leaf=S_2]
]
[,dir=north west
[,dir=north east
[,leaf=mu_2] [,leaf=mu_1]
]
[,leaf=S_1]
]
]]
draw[dotted] (Y) -- (X);
draw[decorate,decoration={brace,raise=5pt}] ($(Y)+(0,.35)$) -- node [pos=0.8,above=2.5ex] {$e$} ($(X)+(0,.35)$) ;
end{forest}
end{document}
Answered by Alan Munn on April 19, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP