pauladam94 / curryst

Typst Package to typeset inference rule
MIT License
20 stars 2 forks source link

Centering an inference rule on the horizontal line. #26

Open alexarice opened 1 week ago

alexarice commented 1 week ago

I have some inference rules which I want to look like the following:

 A      
---    ---
 B      B

following the advice in #14, I can create something similar but by default the rule with an empty premise will be aligned differently. I can hack around this by adding hide($A$) as a premise to this rule but was wondering if there's any way to set the horizontal line as the "anchor" (unsure if this is the correct terminology)

MDLC01 commented 1 week ago

The solution I typically use is align(bottom).

Of course, this assumes all your conclusions have the same height, which is often the case, but may not be if you use a block equation instead of an inline equation.

MDLC01 commented 4 days ago

There is no way to set the baseline of a box in Typst at the moment, so this issue cannot be solved other than by using the above workaround for now.