Advertisement
Guest User

Untitled

a guest
Nov 27th, 2015
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 0.67 KB | None | 0 0
  1. \documentclass[paper=a4, fontsize=11pt]{scrartcl}
  2. \usepackage{forest}
  3.  
  4. \begin{document}
  5. \begin{forest}
  6. before typesetting nodes = {
  7.     where n children = 0 {
  8.         if content = {\epsilon} {
  9.             append = {
  10.                 [{\epsilon},math content,tier=terminal,no edge,color=gray!80]
  11.             }
  12.         }{
  13.             append = {
  14.                 [,math content,tier=terminal,edge=dotted,content/.pgfmath=content("!u")]
  15.             }
  16.         }
  17.     }{}
  18. },
  19. for tree={
  20.     math content
  21. }
  22.     [S
  23.         [S_0
  24.             [0]
  25.             [S_0
  26.                 [0]
  27.                 [S_0
  28.                     [0]
  29.                     [S_0
  30.                         [0]
  31.                         [S_0
  32.                             [0]
  33.                         ]
  34.                     [1]
  35.                     ]
  36.                 [1]
  37.                 ]
  38.             [1]
  39.             ]
  40.             [1]
  41.         ]
  42.         [S_1
  43.             [2]
  44.             [S_1
  45.                 [{\epsilon}]
  46.             ]
  47.         ]
  48.     ]
  49. \end{forest}
  50. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement