Open ondohotola opened 1 year ago
Right now only the third option works without changing the package. You could for instance write:
#import "@local/din-5008-letter:0.1.0"
#let wordings = din-5008-letter.load-wordings("de-formal")
#wordings.insert("attachments", "Encl.")
#show: din-5008-letter.letter.with(wordings: wordings, attachments: ("thing 1", "thing 2"))
#lorem(100)
I think that option 2 would be the nicest one, and should at some point be implemented. You can however already take inspiration of the code, which basically just loads a dictionary from some 'languages', and use this directly in your document.
I chose option one, and since I have no clue how a Pull Request works, here my new wordings.toml
[de-formal]
salutation = "Sehr geehrte Damen und Herren"
closing = "Mit freundlichen Grüßen"
attachments = "Anlagen"
[de-informal]
salutation = "Hallo"
closing = "Liebe Grüße"
attachments = "Anlagen"
[debug]
salutation = "<salutation>"
closing = "<closing>"
attachments = "<attachments>"
[us]
salutation = "Dear Sir/Madam"
closing = "With Kind Regards"
attachments = "Encl."
How do I adapt this to put something like
"Dear Mr Schmitz"
in my letter, ie a specific, non-generic saluation?
I am not able to adapt option 3 above.
Any advice?
You can also do something like:
#let wordings = (
salutation: [Dear Mr Schmitz],
closing: "With Kind Regards",
attachments: "Encl."
)
hence creating the dictionary directly. If you provide labels, you can even have salutation: [Dear @recipient]
.
I would advise to write a function which returns your default wordings and settings to get a personalized, clean and easy writing experience.
Ludwig,
vielen Dank :-)-O
Ludwig,
I am a Gynecologist and Obstetrician 17 days from retirement, dabbling a little in Perl and have no clue as to how to write this function.
Can someone reading this assist, please?
I mean you probably want something like:
#let wordings(recipient) = (
salutation: [Dear #recipient],
closing: "With Kind Regards",
attachments: "Encl."
)
and then later use #show: letter.with(wordings: wordings("Mr Schmitz"))
Thanks,
that works well
Save of modifying
wordings.toml
, how do I change the (default) word "Anlagen" to something like "Encl."