david-davies / typst-prooftree

MIT License
6 stars 1 forks source link

Weird uni offset in somewhat complex proof tree #5

Open Garmelon opened 5 months ago

Garmelon commented 5 months ago

The following code produces the following tree:

#import "@preview/prooftrees:0.1.0"

#prooftrees.tree(
  prooftrees.axi[This is a wiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiide axiom],
  prooftrees.uni[x],
  prooftrees.axi[y],
  prooftrees.bin[Combining the axioms],
  prooftrees.uni[Offcenter compared to above],
)

image

I would have expected it to look like this (edited with gimp): image

If you make the bottom uni smaller, it looks correct again:

#import "@preview/prooftrees:0.1.0"

#prooftrees.tree(
  prooftrees.axi[This is a wiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiide axiom],
  prooftrees.uni[x],
  prooftrees.axi[y],
  prooftrees.bin[Combining the axioms],
  prooftrees.uni[Not offcenter],
)

image

If you remove the uni[x], it also looks correct again:

#import "@preview/prooftrees:0.1.0"

#prooftrees.tree(
  prooftrees.axi[This is a wiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiide axiom],
  prooftrees.axi[y],
  prooftrees.bin[Combining the axioms],
  prooftrees.uni[Offcenter compared to above],
)

image