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

Error generating PDF: "A JavaScript error occurred in the main process" #27

Closed
xxbc opened this Issue Aug 13, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@xxbc

xxbc commented Aug 13, 2018

Error on generating PDF

Uncaught Exception: Export failed: An error occurred on export: Error: Command failed: pandoc "/var/folders/sj/mnk7m9s114sc__bh8ykbjxb80000gq/T/export.tmp" -f markdown --template="/var/folders/sj/mnk7m9s114sc__bh8ykbjxb80000gq/T/template.latex" --pdf-engine=xelatex -o "/var/folders/sj/mnk7m9s114sc__bh8ykbjxb80000gq/T/living-brands.pdf" Error producing PDF. ! LaTeX Error: File shading.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.14 ^^M

I opened a note, clicked the "share the current file" icon and selected PDF

It should generate a PDF for me

Error above

Platform

  • OS: Mac OS
  • OS Version: 10.13.6
  • Zettlr Version 0.18.1

I had upgraded to 0.18.1 and had this happen. I then uninstalled completely and reinstalled fresh, same problem.

@nathanlesage

This comment has been minimized.

Show comment
Hide comment
@nathanlesage

nathanlesage Aug 13, 2018

Contributor

Hey xxbc,

this error is a pandoc/LaTeX-issue. I've also encountered it when I tried to export a file. This is generated when you try to export code blocks, because pandoc then requires the file shading.sty, which seems to be optional in all LaTeX-installations and it seems that one needs to download it manually. I've tried to pin down the issue but haven't been successful until now. But I may have found something.

In this issue someone points to the --listings-flag for pandoc. Let me try this out and get back to you soon.

EDIT: Also, in this issue they recommend following some additional steps to set up additional packages on macOS. If you like to, please try it out, and let me know if it helped you, so that I can put it in the FAQ, if this solves the issue.

Contributor

nathanlesage commented Aug 13, 2018

Hey xxbc,

this error is a pandoc/LaTeX-issue. I've also encountered it when I tried to export a file. This is generated when you try to export code blocks, because pandoc then requires the file shading.sty, which seems to be optional in all LaTeX-installations and it seems that one needs to download it manually. I've tried to pin down the issue but haven't been successful until now. But I may have found something.

In this issue someone points to the --listings-flag for pandoc. Let me try this out and get back to you soon.

EDIT: Also, in this issue they recommend following some additional steps to set up additional packages on macOS. If you like to, please try it out, and let me know if it helped you, so that I can put it in the FAQ, if this solves the issue.

@xxbc

This comment has been minimized.

Show comment
Hide comment
@xxbc

xxbc Aug 13, 2018

@nathanlesage thanks for the links, I have pandoc and latex both installed and up to date but I'll check out the thread and see if adding anything additional helps resolve it.

xxbc commented Aug 13, 2018

@nathanlesage thanks for the links, I have pandoc and latex both installed and up to date but I'll check out the thread and see if adding anything additional helps resolve it.

@xxbc

This comment has been minimized.

Show comment
Hide comment
@xxbc

xxbc Aug 15, 2018

@nathanlesage followed through on that 2nd link you sent over, but nothing really working on this side.

xxbc commented Aug 15, 2018

@nathanlesage followed through on that 2nd link you sent over, but nothing really working on this side.

@nathanlesage

This comment has been minimized.

Show comment
Hide comment
@nathanlesage

nathanlesage Aug 15, 2018

Contributor

Thanks for the notice, I'll give the --listings-option a try. I believe it's pretty easy to solve, but the behaviour of pandoc is somewhat opaque concerning PDF generation…

Contributor

nathanlesage commented Aug 15, 2018

Thanks for the notice, I'll give the --listings-option a try. I believe it's pretty easy to solve, but the behaviour of pandoc is somewhat opaque concerning PDF generation…

@nathanlesage

This comment has been minimized.

Show comment
Hide comment
@nathanlesage

nathanlesage Aug 21, 2018

Contributor

@xxbc The current development branch should successfully export code blocks now. There simply was a command missing in the template provided by Zettlr.

Contributor

nathanlesage commented Aug 21, 2018

@xxbc The current development branch should successfully export code blocks now. There simply was a command missing in the template provided by Zettlr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment