Helpful_Lab_Materials icon indicating copy to clipboard operation
Helpful_Lab_Materials copied to clipboard

Draft watermark appears even though "draft = no"

Open annaweichselbraun opened this issue 7 years ago • 6 comments

Hi there, I'm having trouble with my PDF without a watermark. This heading produces a watermark.

size: 11pt draft: no head: address: '616 Address' city: CIty state: CA zip: 94040 phone: '(312) 123-4567' email: '[email protected]' dept: "XX" sig: include: yes sign: yes name: 'Anna Weichselbraun, PhD' post: Lecturer secondpost:

annaweichselbraun avatar Aug 24 '18 23:08 annaweichselbraun

And when I %% out the watermark and delete the "draft" line from the markdown file I get some other error about the Image file...

annaweichselbraun avatar Aug 24 '18 23:08 annaweichselbraun

this error:

Error producing PDF.
! Undefined control sequence.
<argument> \includegraphics
                            [height=1in]{./Stanford.pdf}
l.62 ...or International Security and Cooperation}

annaweichselbraun avatar Aug 24 '18 23:08 annaweichselbraun

My first guess would be that it has something to do with that final error you mentioned (the watermark itself is at line 57 - 60 in cltemplate.tex. Hopefully this gets clearer after #1 is fixed.

Microbiology avatar Aug 27 '18 02:08 Microbiology

Yes, I think so too. I tried commenting out lines 57-60 and would then run into the other error.

On Sun, Aug 26, 2018 at 7:01 PM Geoffrey Hannigan, PhD < [email protected]> wrote:

My first guess would be that it has something to do with that final error you mentioned (the watermark itself is at line 57 - 60 in cltemplate.tex. Hopefully this gets clearer after #1 https://github.com/Microbiology/PandocAcademicCoverLetter/issues/1 is fixed.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Microbiology/PandocAcademicCoverLetter/issues/2#issuecomment-416093680, or mute the thread https://github.com/notifications/unsubscribe-auth/ATPUIvjp3lowvtDnYkcs948uP3N9bO0Qks5uU1MTgaJpZM4WMGzg .

annaweichselbraun avatar Aug 27 '18 16:08 annaweichselbraun

I am on macOs, installed pandoc (2.3) with brew, and still have the same bug.

From http://pandoc.org/MANUAL.html (search for "Using Variables in templates") I understand that boolean variables as YAML should take the values 'true' or 'false', rather than 'yes' or 'no'.

In fact, commenting line 57-60 in cltemplate.tex (or deleting them) gives the same error if the YAML value is set as "draft: false".

I do not understand why - under these circumstances - one gets the error

! Undefined control sequence. \includegraphics

It is as if the (LaTeX) package to include graphics is not included explicitly but it gets "inherited", so to speak, by the watermark package inclusion....

mgiugliano avatar Oct 03 '18 21:10 mgiugliano

Adding the line

\usepackage{graphicx} % Needed to insert images into the document

and using 'true' and 'false', instead of 'yes' and 'no', works!

mgiugliano avatar Oct 03 '18 21:10 mgiugliano