Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow YAML header to specify a different documentclass #36

Merged
merged 1 commit into from
Mar 27, 2023

Conversation

jgrigera
Copy link
Contributor

With this simple patch users can specify documentclass in the header and use alternative versions of the letter class, such as scrltr or others.

@aaronwolen
Copy link
Owner

Thank you @jgrigera!

@aaronwolen aaronwolen merged commit 31e603e into aaronwolen:master Mar 27, 2023
jorgeegomez added a commit to jorgeegomez/pandoc-letter that referenced this pull request Jun 27, 2023
Allow YAML header to specify a different documentclass (aaronwolen#36)
@lamyergeier
Copy link

@jgrigera @aaronwolen

  • With the above change I get a new error:
! Undefined control sequence.
l.64 \signature

Without this change I don't get this error!

@jgrigera
Copy link
Contributor Author

jgrigera commented Aug 9, 2023 via email

@lamyergeier
Copy link

lamyergeier commented Aug 10, 2023

@jgrigera I didn't specify any document class:

$ \cat Sample.markdown 
---
author: Aaron
opening: To whom it may concern,
closing: Sincerely,
address:
- 123 Street Rd
- Chicago, IL
return-address:
- My Home
- 456 Road St.
- New York, NY
links-as-notes: true
---

Paragraph 1

> Paragraph 2

Paragraph 3
$ Template="${HOME}/Documents/Git/Linux/AmazingNotes/AmazingNotesSrc/MdRenderSpecial/Resource/PandocLetter/Resource/pandoc-letter/template-letter.tex"
$ Filename=Sample
$ dOutputP=Output
$ mkdir --parents "${dOutputP}"
$ pandoc --template="${Template}" ${Filename}.markdown -o "${dOutputP}/${Filename}.pdf"
Error producing PDF.
! Undefined control sequence.
l.57 \signature

@jgrigera
Copy link
Contributor Author

Just checked and you are right! Apologies for this wrong commit @lamyergeier and @aaronwolen

I provided the patch without noticing that pandoc sets the documentclass to article by default and thus broke this template.
See:
[https://github.com/jgm/pandoc/blob/cc371a9485241db3e0101180432e2122d023a9bd/src/Text/Pandoc/Writers/LaTeX.hs#L109]

There is already a fix in the PRs, see #37. @aaronwolen can you accept the PR?

Apologies!
Juan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants