andreasKroepelin / polylux

A package for creating slides in Typst
https://polylux.dev/book
MIT License
1.14k stars 51 forks source link

Creating columns adds an extra space between slide title and content #174

Open m-kru opened 3 months ago

m-kru commented 3 months ago
#slide[
== Title
#columns(2)[
+ airhdl
+ AGWB
+ AutoFPGA
+ Cheby
+ Corsair
+ FPGA Vendors
+ hdl_register
+ II & CII
+ IP_XACT
+ Opentitan Register Tool
+ Register Wizard
+ RgGen
+ SystemRDL
+ vhdMMIO
+ wbgen2
+ Others (2)
]
]

Generated slide: image

The extra space is gone if I remove the #columns(2)[ command.

jamesrswift commented 3 months ago

While only a bandaid fix, you could use a negative vertical space after the heading

m-kru commented 3 months ago

Yeah, yet another workaround is to #show heading: set block(below: 1em).

Enivex commented 3 months ago

Yeah, yet another workaround is to #show heading: set block(below: 1em).

I mean, that's not really a workaround, but the intended way to set block spacing. This is not a bug.

m-kru commented 3 months ago

So creating columns by default adds an extra space? If so, how can I create columns and inform typst to not add an extra space? Both, negative vertical space and show heading approaches vertically realign the block with columns. However, the realignment value is provided by the user by hand, and it might not be equal to the value of the extra space added automatically by the typst.