david-davies / typst-prooftree

DEPRECATED - use https://github.com/pauladam94/curryst instead.
MIT License
7 stars 1 forks source link

Taking into account the titles of a rule in the size of the block. #4

Open pauladam94 opened 1 year ago

pauladam94 commented 1 year ago

I am using a lot of "proof tree" while writing an article. My rules have very long names like "TypBorrowingRef" "TypFuncCall". And I am forced to took into account the length of the title in the layout of the tree. I also believe that for small title rule, it is better to take into account the size of the title even if by chance it can kinda work without thinking about it.

This typically doesn't work when I add a long title in one of the Readme example.

#prooftrees.tree(
    prooftrees.axi[$B => B$],
    prooftrees.uni[$B => B, A$],
    prooftrees.uni(right_label: [A A A A A])[$B => A, B$],
        prooftrees.axi[$A => A$],
        prooftrees.uni[$A => A, B$],
    prooftrees.bin[$B => A, B$]
)

This is the output I have (I have simply clone the repo and change this example to see the output)

Capture d’écran 2023-11-20 à 20 29 32