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

add logo to header, remove sender-box? #5

Closed alperyilmaz closed 2 months ago

alperyilmaz commented 3 months ago

Hi, Thanks for the package. I was using Latex version of this letter format. But I was fed up with problems with Latex version. I'm so glad there's Typst version.

I have two questions:

  1. is it possible to add a logo to left upper corner in the letter? If yes, can you please help me about correctly adding a logo.
  2. I tried to remove the sender-box but I couldn't. can you also help me with that? I just need my name and address at right top corner (this works :heavy_check_mark: ) Right below that I want the date and then Subject. So I don't want any information box, recipient box or sender-box. letter-simple accepts the following arguments:
    information-box: none,
    reference-signs: none,

    So I can turn of those boxes. But I couldn't remove sender-box. (shown below). image

Sematre commented 3 months ago

Hey, this package allows you to replace the default header with your own header. So if you want to add a logo, you need to reconstruct the entire header. You can take a look at the letter layout in the documentation.

Here's an example implementation:

#show: letter-simple.with(
  header: pad(
    left:   25mm,
    right:  20mm,
    top:    10mm,
    bottom: 5mm,

    grid(
      columns: (1fr, 1fr),
      rows: 100%,
      align: (top + left, bottom + right),

      [
        // This is the left side
        #image("Your logo.png", height: 100%)
      ], [
        // This is the right side
        #set text(size: 10pt)

        *Your name*\
        Your address\
        etc.\
      ]
    )
  ),

  // [...]
)

Now for your second problem: It's currently not possible to remove the recipient and information box, as they are part of the DIN 5008 standard. I'm also not planning on changing this for now.

Sematre commented 2 months ago

Did this resolve your issue? Or maybe I misunderstood your question? Did you only intend to blank out the outlined space in your picture and not remove it entirely?

Edit: I'm closing this issue due to inactivity. Feed free to reopen if this hasn't been resolved yet.