Closed davidbaniadam closed 4 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.
Could you please open a separate issue for the trouble with the return-address
containing a minimal reproducible example.
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
Things I learned while searching for a way to change the font:
lco
-settings (maintainerDelight.lco
) overwrites font choices done elsewhere because it is loaded later than the options set via YAML and the template.tex
.maintainerDelight.lco
.
lco
does not know about YAML parameters. All pandoc magic is already done when the lco
comes into play.\usepackage{ifthen}
does not work because there is no easy way to detect whether a custom font was set. Font setting looks very different depending on the YAML parameter given by the user e.g. setting fonts via tex-packages or xelatex and fontspec
. Maybe set a flag if a custom font is set?Hacks / Workarounds:
lco
-file, e.g.
lco: DIN
(this allows for setting fonts via YAML parameter fontfamily
, e.g. lco: DIN
together with fontfamily: arev
) [1]lco
-settings maintainerDelight.lco
) by changing the fontselection method to fontspec
which requires xelatex. A sans font has to be provided because maintainerDelight.lco
makes sans font the documents default font, e.g. use latex_engine: xelatex
together with sansfont: Arial
[2][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
---
To conclude, I would appreciate suggestions on how to set a font in the default lco that can be overridden by YAML settings.
Hi, Thanks for the package. How can I change the font.. it does not seem to be working? And the
return-address
show double. How can only keep the upper-left one?