davidar / pandiff

Prose diffs for any document format supported by Pandoc
MIT License
285 stars 24 forks source link

Could not convert TeX math and Package inputenc Error when converting to PDF #1

Closed sjackman closed 5 years ago

sjackman commented 6 years ago

I'm getting the following two errors when running pandiff.

[WARNING] Could not convert TeX math '\textrm{PPV} = \frac{55}{210} = 0.26', rendering as TeX

which may be avoided by adding --mathjax to the command line.

! Package inputenc Error: Unicode char \u8:  not set up for use with LaTeX.
…
Try running pandoc with --pdf-engine=xelatex.

which may be avoided by adding --pdf-engine=xelatex to the command line.

Any suggestions how to fix this?

In the same run, I also get this error:

(node:45417) UnhandledPromiseRejectionWarning: 43
(node:45417) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:45417) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
sjackman commented 6 years ago

As a workaround I'm using GitHub's compare feature, rendering a rich diff of the Markdown, selecting the diff region in Google Chrome, and saving the selection to a PDF.

sjackman commented 5 years ago

Thanks for the fix, David!

davidar commented 5 years ago

No problem :)