Open scavi-github opened 3 months ago
Seems like a useful addition, but how would you define the API?
If this is your first example:
#show: letter-simple.with(
sender: (
name: "Anja Ahlsen",
address: "Deutschherrenufer 28, 60528 Frankfurt",
extra: [
Telefon: #link("tel:+4915228817386")[+49 152 28817386]\
E-Mail: #link("mailto:aahlsen@example.com")[aahlsen\@example.com]\
],
),
// etc.
)
How would you like your second example to be implemented?
There's an example:
#show: letter-simple.with(
sender: (
name: "Anja Ahlsen",
address: "Deutschherrenufer 28, 60528 Frankfurt",
extra: (
([Telefon], link("tel:+4915228817386")[+49 152 28817386]),
([E-Mail], link("mailto:aahlsen@example.com")[aahlsen\@example.com]),
),
),
// etc.
)
How about adding an extra option, e.g. textalign
, to sender
? If unspecified, its default value would be right
, but one could set it to left
, or, for my second example, it could take an array (right, left)
.
Then there is a choice to either...
name
and address
in the second/last column and use arrays for the elements in extra
;name
and address
as well, to make it more customizable.For the first version, the syntax could look like this:
#show: letter-simple.with(
sender: (
textalign: (right, left),
name: "Anja Ahlsen",
address: "Deutschherrenufer 28, 60528 Frankfurt",
extra: (
([Telefon], link("tel:+4915228817386")[+49 152 28817386]),
([E-Mail], link("mailto:aahlsen@example.com")[aahlsen\@example.com]),
),
),
// etc.
)
By the way, the change in text size I made in my example picture should in my opinion not be caused by any of this and can always be put in by hand, e.g. by manually writing text(0.7em)[Telefon:]
instead of [Telefon:]
.
Hi, this is a very nice template!
It would be really cool to have more options for text alignment in the sender box (but still have the box on the right-hand side of the page), e.g. to have the text left-aligned, or even better, to have right and left alignment like in a two-column table.
So, using the example from the README, to change the sender box from this:
to something like this: