Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass[paper=a4, fontsize=11pt]{scrartcl}
- \usepackage{forest}
- \begin{document}
- \begin{forest}
- before typesetting nodes = {
- where n children = 0 {
- if content = {\epsilon} {
- append = {
- [{\epsilon},math content,tier=terminal,no edge,color=gray!80]
- }
- }{
- append = {
- [,math content,tier=terminal,edge=dotted,content/.pgfmath=content("!u")]
- }
- }
- }{}
- },
- for tree={
- math content
- }
- [S
- [S_0
- [0]
- [S_0
- [0]
- [S_0
- [0]
- [S_0
- [0]
- [S_0
- [0]
- ]
- [1]
- ]
- [1]
- ]
- [1]
- ]
- [1]
- ]
- [S_1
- [2]
- [S_1
- [{\epsilon}]
- ]
- ]
- ]
- \end{forest}
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement