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

Example does not work for commit 31e603e #37

Open
BenjaminRodenberg opened this issue Apr 1, 2023 · 4 comments
Open

Example does not work for commit 31e603e #37

BenjaminRodenberg opened this issue Apr 1, 2023 · 4 comments

Comments

@BenjaminRodenberg
Copy link

First of all: Thank you a lot for providing this template!

I cloned this repository and discovered that the example does not work. Then I went back by one commit and it worked again. I guess that 31e603e somehow introduced a bug here. I ran the following commands:

pandoc-letter$ pandoc --template=template-letter.tex example/letter.md -o example/letter.pdf
Error producing PDF.
! Undefined control sequence.
<recently read> \signature 
                           
l.64 \signature

pandoc-letter$ git checkout b0fd7342b352ebb87aea17614ec014f68d48747f
M	example/letter.pdf
Note: switching to 'b0fd7342b352ebb87aea17614ec014f68d48747f'.
...
pandoc-letter$ pandoc --template=template-letter.tex example/letter.md -o example/letter.pdf

The for b0fd734 the command worked as expected and a pdf was produced.

@CDSoft
Copy link

CDSoft commented Apr 8, 2023

I'm facing the same issue. The diff between both commits shows the document class can be overridden by the documentclass variable.
For some reasons it may be set somewhere to something different.
If I set documentclass in the document, it works:

---
documentclass: letter
...

This variable can also be set with the pandoc command:

pandoc --template=template-letter.tex -V documentclass:letter ...

@to-json
Copy link

to-json commented Jun 25, 2023

$documentclass$ appears to be shadowing \documentclass

PR inbound that would keep the change but rename $documentclass$ to $userdocumentclass$, but, given that some of those constructs in the template are part of letter I'm not actually sure accommodating user-specified documentclass is good?

@jgrigera
Copy link
Contributor

jgrigera commented Aug 10, 2023

Hi!
I am sorry 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

I see that @to-json made a good fix - changing this to userdocumentclass if people want to specify a different documentclass and avoid the hassle of having to provide letter by default. Thanks!

Apologies!
Juan

@hasufell
Copy link

This repo is a mess.

Even with the suggested change, you get errors:

Error producing PDF.
! LaTeX Error: File `wallpaper.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name:
! Emergency stop.
<read *>

l.80 \ThisULCornerWallPaper

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

No branches or pull requests

5 participants