rnuske / komaletter

R package for comfortable writing of beautiful PDF letters in Markdown.
https://rnuske.github.io/komaletter
86 stars 21 forks source link

Font #6

Closed davidbaniadam closed 4 years ago

davidbaniadam commented 5 years ago

Hi, Thanks for the package. How can I change the font.. it does not seem to be working? And the return-addressshow double. How can only keep the upper-left one?

rnuske commented 5 years ago

Hi David, I regarded the font to be a fundamental part of the layout and as such hardcoded it in the default layout maintainersDelight.lco. Meaning, a different choice of fonts requires a custom .lco-file. One could copy the maintainersDelight.lco into the working directory, adapt to one's own taste and reference the custom style-file it with the YAML parameter lco in the heading of the letter.

Looking into the template used by pandoc I recognized that rmarkdown usually seems to offer the possibility to change the font. I have to think about if and how komaletter should support these parameters.

Could you please post a minimal reproducible example showing which YAML header parameters you want to use.

rnuske commented 5 years ago

Could you please open a separate issue for the trouble with the return-address containing a minimal reproducible example.

davidbaniadam commented 5 years ago

Hi thanks for the response. People like the design with return-address so I think I just keep it the way it is. So if you want you can just close the issue. And I think the font is good too now. Again thanks for the package! All the best

rnuske commented 4 years ago

Things I learned while searching for a way to change the font:

Hacks / Workarounds:

[1]

---
author: Max Mustermann
return-address: [Musterstr. 12, 34567 Musterstadt]
address: [Dirk Eddelbuettel, 123 Street Rd, Chicago, IL]

lco: DIN   
fontfamily: arev

output:  komaletter::komaletter
---

[2]

---
author: Max Mustermann
return-address: [Musterstr. 12, 34567 Musterstadt]
address: [Dirk Eddelbuettel, 123 Street Rd, Chicago, IL]

sansfont: Optima

output: 
  komaletter::komaletter:
    latex_engine: xelatex
---
rnuske commented 4 years ago

To conclude, I would appreciate suggestions on how to set a font in the default lco that can be overridden by YAML settings.