latex letter support #10203
-
Are there any objections to modifying the default latex template to add letter support? Other templates already exist, such as https://github.com/aaronwolen/pandoc-letter. Rather than keep using a custom template, |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 8 replies
-
It's hard to say without seeing what changes would be entailed. |
Beta Was this translation helpful? Give feedback.
-
Using which letter class or package: An issue with using the Previously @tarleb had contributed the scrlttr2 Lua filter, now deprecated in favor of the pandoc-scrlttr2 template. Because there are so many letter options, if the default template was modified there would likely need to be something like a For my purposes, I have modified the default latex template to use template partials when a |
Beta Was this translation helpful? Give feedback.
-
I think my view is that this is a job for a separate custom template, and that trying to handle it with conditionals in the default template will lead to confusing complexity. |
Beta Was this translation helpful? Give feedback.
-
I started off with a custom letter template, using a stripped down copy of the default template, but found over time that more and more default template features were required (e.g., headings, tables, figures), and when working in Europe that certain countries had standards for business letters that needed to be met (e.g., DIN 5008 in Germany and NEN 1026 in the Netherlands). I know too that some Asian countries have letter standards. Also, because I was already using a customised default template that having to keep two templates synced with the upstream changes to the default template became a chore. And, I suspect why the separate beamer template got included in the default latex template. Hence, as soon as pandoc supported template partials, I converted to the method described above. If a separate letter template is included, I would suggest that instead of using a letter class, to rather use the BTW I didn't do this. Initially using the |
Beta Was this translation helpful? Give feedback.
-
One thing I'm tempted to try doing is splitting off much of the existing latex template into partials. We could then have separate templates for beamer and for letter, and they could just import these partials to avoid code duplication. The existing combined latex/beamer template is quite cumbersome, with all those conditionals, so I think this would make things a bit clearer and easier to maintain. |
Beta Was this translation helpful? Give feedback.
-
I've created a PR for proposed changes: #10280 |
Beta Was this translation helpful? Give feedback.
-
I had come up with a letter template in the latex-partials branch, but reverted it before merging. Here it is, for comparison:
I'm still not sure whether it makes sense to have a letter template in the default pandoc distribution. Usually these things need to be customized to fit specific organization requirements (exact placement of letterhead, for example), so I'm not sure how valuable a default template would be. But, open to discussion. |
Beta Was this translation helpful? Give feedback.
I think my view is that this is a job for a separate custom template, and that trying to handle it with conditionals in the default template will lead to confusing complexity.
We could think about including a separate letter.latex template in the default distribution, though; then you'd just need
--template=letter
.