TransWikia.com

How can I center this rather uneven parent node around its dashes?

TeX - LaTeX Asked by user235509 on March 25, 2021

A very simple tree with a rather uneven, i.e., not properly centred, parent node.

A screenshot of the TeX file for the tree in question

My question is: given the tree in question, how can I centre its parent node around its dashes?

This is a sample of a much bigger, and complex, genealogical tree I am trying to build.

I would very much appreciate an answer.

You can find below the source code.

Thank you.

documentclass{standalone}

usepackage[edges]{forest}

begin{document}

begin{forest}
  forked edges, for tree={grow=north}
 [AAAAA --- BBB
    [A ]
    [B ]
    [C ]
    [D ]
    [E ] ]
end{forest}

end{document}

One Answer

One way is to make root text even around dashed by use of hphantom:

documentclass{standalone}
usepackage[edges]{forest}

begin{document}

begin{forest}
  forked edges, for tree={grow=north}
 [AAAAA --- BBBhphantom{BB}
    [A ]
    [B ]
    [C ]
    [D ]
    [E ] ]
end{forest}

end{document}

enter image description here

Correct answer by Zarko on March 25, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP