
우리는 책을 위한 라텍스 수업을 준비하고 있습니다. 우리는 특정 나무 스타일을 의 기본값으로 만들고 싶습니다 forest
. 아래 예에서는 모든 트리에서 스타일(sn 가장자리)을 정의해야 합니다. 이 사양을 제거하고 기본값으로 설정할 수 있는 방법이 있나요?
\documentclass{minimal}
\usepackage{forest}
\forestset{
sn edges/.style={for tree={parent anchor=south, child anchor=north,align=center,base=bottom,where n children=0{tier=word}{}}},
background tree/.style={for tree={text opacity=0.2,draw opacity=0.2,edge={draw opacity=0.2}}}
}
\begin{document}
\begin{forest}
sn edges
[S
[NP [er\\he] ]
[NP
[Det [das\\the] ]
[N [Buch\\book] ]
]
[NP
[Det [der\\the] ]
[N [Frau\\woman] ]
]
[V [gibt\\gives] ]
]
\end{forest}
\end{document}
답변1
질문이 해결되지 않은 Stefan인지 확실하지 않지만 예를 들어 다음 코드는 모든 포리스트 환경에 적용됩니다.
\forestset{.style={for tree={l=1em, l sep=1em, s sep=1em}}}
본질적으로 스타일 이름을 삭제하면 됩니다. :)
도움이 되었기를 바랍니다.