Sematre / typst-letter-pro

DIN 5008 letter template for Typst
https://typst.app/universe/package/letter-pro/
MIT License
68 stars 2 forks source link

Position/margin of information-box #8

Closed kleinph closed 2 months ago

kleinph commented 2 months ago

I am not sure if this is intended, but the information-box is not aligned with the sender box when right aligned.

grafik

information-box: [
    #set align(end)

    Kunden UID-Nr. \
    ATU12345678

    Rechnung Nr. \
    2023-001
 ],

Thanks!

Sematre commented 2 months ago

Yes, this is intentional. DIN 5008 specifies the information box to have a max width of 75mm.

This image from Wikipedia explains it quite well: DIN_5008,_Form_A

I recommend adding 10mm extra padding when right aligning:

#show: letter-simple.with(
  // [...]
  information-box: pad(right: 10mm)[
    #set text(size: 10pt)
    #set align(end)

    Kunden UID-Nr. \
    ATU12345678

    Rechnung Nr. \
    2023-001
  ],
  // [...]
)
kleinph commented 2 months ago

Thank you very much, this works. I tried pad before, but used it the wrong way (with #set).