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

make: *** [pdf] Error 1 #69

Closed
FrancescoFilippi opened this issue Mar 1, 2018 · 8 comments
Closed

make: *** [pdf] Error 1 #69

FrancescoFilippi opened this issue Mar 1, 2018 · 8 comments

Comments

@FrancescoFilippi
Copy link

I'm trying to use the template in my thesis. Love both the idea and the template, but I'm stack with this error:

Unknown reader: pdf
Pandoc can convert to PDF, but not from PDF.
make: *** [pdf] Error 1

I've updated the make script as --latex-engine isn't supported anymore and (listening to pandoc own logging) --pdf-engine should be used. Final Makefile's pdf script looks like this:

pdf:
	pandoc $(INPUTDIR)/*.md \
	-o $(OUTPUTDIR)/thesis.pdf \
	-H $(STYLEDIR)/preamble.tex \
	--template $(STYLEDIR)/template.tex \
	--bibliography=$(BIBFILE) \
	--csl=$(STYLEDIR)/ref_format.csl \
	-V fontsize=12pt \
	-V papersize=a4paper \
	-V documentclass:report \
	-N \
	--pdf-engine=xelatex

I've installed every package required by the preamble.tex file and I can't get the script up and working.
Any ideas? Thanks.

@robwalton
Copy link

robwalton commented Mar 1, 2018

Pandoc uses the file extension of input files to determine the reader type. So, two thing is might be:

  1. Is the -V documentclass:report line correct. I think it should have an equal not at semicolon. This might mess up pandoc's argument parsing.

  2. Does $(INPUTDIR)/*.md definitely find any files?

tompollard added a commit that referenced this issue Mar 1, 2018
@FrancescoFilippi
Copy link
Author

FrancescoFilippi commented Mar 1, 2018

I tried to bypass the makefile and run the pandoc command directly with the local paths (documentclass:report updated with documentclass=report):

pandoc -N -H style/preamble.tex --template style/template.tex --bibliography=source/references.bib --csl=style/ref_format.csl -V fontsize=12pt -V papersize=a4paper -V documentclass=report source/*.md --pdf-engine=xelatex -o output/thesis.pdf

Something actually changed and the previous error is gone, so @robwalton was right and there was definitely something wrong with $(INPUTDIR)/*.md. In fact looks like now is trying to generate the .pdf, but a different kind of error did show up:

Error producing PDF.
! Undefined control sequence.
<argument> \LaTeX3 error: 
                           Erroneous variable \c__fontspec_shape_n_n_tl used!
l.3806 \emfontdeclare{ \emshape, \eminnershape }

@tompollard
Copy link
Owner

@FrancescoFilippi The command that you've listed works fine for me. What is your operating system, pandoc version, and latex distribution? Thanks for highlighting the --latex-engine issue, btw. I've updated the Makefile.

@FrancescoFilippi
Copy link
Author

FrancescoFilippi commented Mar 1, 2018

@tompollard

  • macOS High Sierra 10.13.1
  • pandoc 2.1.1
    Compiled with pandoc-types 1.17.3.1, texmath 0.10.1, skylighting 0.6
    Default user data directory: /Users/francesco/.pandoc
  • pdfTeX 3.14159265-2.6-1.40.18 (TeX Live 2017)
    kpathsea version 6.2.3

I didn't install the whole MacTeX distribution, just the basicTeX.

@tompollard
Copy link
Owner

tompollard commented Mar 1, 2018

It sounds like the last point in your list might be an issue. You may be missing the required packages. Can you check if fontspec is installed?

tlmgr list --only-installed | grep fontspec

If it is installed, you should see something like:

i fontspec: Advanced font selection in XeLaTeX and LuaLaTeX.

@tompollard
Copy link
Owner

Could you post the result of tlmgr info fontspec?

@FrancescoFilippi
Copy link
Author

That's it. fontspec was installed but there was a version mismatch. So

tlmgr update fontspec

solved the problem. Thanks!

@tompollard
Copy link
Owner

Great, thanks @FrancescoFilippi.

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

3 participants