seachel / treehehe

An interactive visualization of proof tree representations of mathematical proofs using D3 and MathJax.
0 stars 0 forks source link

Compare baseline alignment for TeX and non-TeX #48

Closed seachel closed 5 years ago

seachel commented 5 years ago

Make and example proof tree and compare the vertical alignment with regular text and text laid out with MathJax. Adjust to make these equal. The vertical positioning may need to be adjusted later to center on each line of the proof.

seachel commented 5 years ago

TeX children are positioned above the entire parent node, which includes the rule text. Need equal padding between a proposition node and the line above? Will this then increase the gap below a proposition to the line below?

seachel commented 5 years ago

Baseline alignment is not set on tex nodes. Double check how this positioning is set. TeX nodes seem to be a fixed distance from the line above. Non-TeX nodes are nearly centred, but usually slightly off.

seachel commented 5 years ago

Does MathJax use the text position? Try modifying this property on the text node and see if it changes the location of the TeX displayed.

seachel commented 5 years ago

Changing alignment-baseline doesn't change the location of the TeX. Maybe use the link height for computing the location of the inference lines and rule text instead.

seachel commented 5 years ago

Solved by resizing background rectangles and moving lines and rule text.