Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for the sender address to appear / not appear above the receiver details #24

Open
cook-f opened this issue Feb 5, 2025 · 1 comment

Comments

@cook-f
Copy link

cook-f commented Feb 5, 2025

Image

The appearance of Anja Ahlsen... above the receiver details I want to be able to disable and as far as I can tell I can't currently disable it, playing around with the code on my own I can see it's quite simple to do so, so I'm more than happy to make PR for this

@cpg314
Copy link

cpg314 commented Mar 18, 2025

@Sematre What would you think about the following patch, adding a sender-box attribute to the letter-simple method that allows customizing the sender box (above the recipient)? For example, the box can be deactivated passing

  sender-box: sender => none,
diff --git a/src/lib.typ b/src/lib.typ
index b18282e..543e36a 100644
--- a/src/lib.typ
+++ b/src/lib.typ
@@ -501,6 +501,7 @@
     address: none,
     extra: none,
   ),
+  sender-box: sender => sender-box(name: sender.name, sender.address),

   recipient: none,

@@ -566,7 +567,7 @@
     )
   }

-  let sender-box      = sender-box(name: sender.name, sender.address)
+  let sender-box      = sender-box(sender)
   let annotations-box = annotations-box(annotations)
   let recipient-box   = recipient-box(recipient)

One might argue that this is a case for letter-generic over letter-simple, but I think this customization is common enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants