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

Cannot "make" PDF #65

Closed
lacabra opened this issue Dec 1, 2021 · 4 comments
Closed

Cannot "make" PDF #65

lacabra opened this issue Dec 1, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@lacabra
Copy link
Collaborator

lacabra commented Dec 1, 2021

In my local MacOS environment, after having installed MacTex (which provides the LaTEX system that pandoc depends on), I get the following error when running make to generate the PDF:

Error producing PDF.
! Argument of \paragraph has an extra }.
<inserted text> 
                \par 
l.1636 \ttl@extract\paragraph

make: *** [pdf] Error 43

Before I attempt to troubleshoot this, it would be good to understand the details of the system where @kfogel has run this successfully.

@lacabra lacabra added the bug Something isn't working label Dec 1, 2021
@kfogel
Copy link
Collaborator

kfogel commented Dec 2, 2021

Hey @lacabra. My system is a Debian GNU/Linux recently-updated testing distribution, with Pandoc 2.9.2.1:

$ pandoc --version
pandoc 2.9.2.1
Compiled with pandoc-types 1.20, texmath 0.12.0.2, skylighting 0.8.5

What version of pandoc do you have, what version of MacTex, and what exact commit of the DPG toolkit tree were you trying to build?

From the error above, it looks like maybe pandoc's internal conversion from Markdown->LaTeX is generating invalid LaTeX? (Hence the syntax error about an extra "}", which presumably is in the (La)TeX input to MacTex.)

The document is building fine for me with commit e79a27d (current head of main) and commit 96bb319 (current head of branch resolve-most-pending-todos, which is one commit past main at the moment).

@lacabra
Copy link
Collaborator Author

lacabra commented Dec 2, 2021

Thanks @kfogel. I was using an older version it seems:

$ pandoc --version
pandoc 2.2.1
Compiled with pandoc-types 1.17.4.2, texmath 0.11, skylighting 0.7.1

I upgraded to the latest available in my system:

$ pandoc --version
pandoc 2.16.2
Compiled with pandoc-types 1.22.1, texmath 0.12.3.2, skylighting 0.12.1, citeproc 0.6, ipynb 0.1.0.2

And unfortunately, now I am getting a different error, which I am investigating:

$ make
pandoc: pdflatex: createProcess: posix_spawnp: illegal operation (Inappropriate ioctl for device)
make: *** [pdf] Error 1

I confirm that I'm on the latest commit of the main branch: e79a27d

@lacabra
Copy link
Collaborator Author

lacabra commented Dec 2, 2021

The previous error is a very cryptic one to say that pdflatex is not installed in the system. That's because MacTex is bundled as a 4GB file, which when installed takes more than 10GB, which is a lot! So I had uninstalled after seeing it was not working for me.

I managed to make it work with the following:

brew install pandoc
brew install basictex
sudo tlmgr update --self
sudo tlmgr install titlesec

Now it works just fine, closing (and I will document this elsewhere for future reference).

@lacabra lacabra closed this as completed Dec 2, 2021
@kfogel
Copy link
Collaborator

kfogel commented Dec 2, 2021

Wow! Sorry for the trouble; I'm glad you debugged it all the way. If you want to make a doc PR for CONTRIBUTE.md or the Makefile, I'll happily review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants