langsci / 177

Chinese version of the English text book on grammatical theory
7 stars 1 forks source link

forest does add an additional line and gets baseline wrong #3201

Closed stefan11 closed 4 years ago

stefan11 commented 4 years ago

In 3-minimalism.tex

grafik

The first is an alignment to the top node. The second is an alignment to "3".

sasozivanovic commented 4 years ago

The culprit is familiar: anchor=north in the default preamble in langsci-forest-setup.sty. Removing this fixes the issue, but presumably introduces another familiar problem: vertical alignment with AVMs.

The only clean solution is of course the fix of AVM I have proposed elsewhere. The temporary solution could be to apply anchor=north only to non-root nodes. Right now, we have for tree={..., anchor=north, ...}. Let's change that to for tree={...}, for descendants={anchor=north}. This should work as long as the desired alignment to the surrounding text is the root node, and the root does not contain an AVM.

I have pushed (commit 78da34f) the temporary solution to the master. I suggest checking all the trees.

stefan11 commented 4 years ago

I removed this since it affects other trees, but used for descendants={anchor=north}for two trees in 3-minimalism.tex, for which I needed it.

stefan11 commented 4 years ago

I leave it at this. Maybe there is no solution that gets everything right ...