Programmers learn & share
0 votes

Problem :

I am getting the bellow error when I am trying to knit a PDF document.
pandoc: error producing pdf error: pandoc document conversion failed with error 43 execution halted
by (6.9k points)   | 43 views

1 Answer

0 votes

Solution :

I had faced this problem in the past while I was trying to add an in-line r code r test1$p.value, which is a very small p-value from t test

The error information is as bellow:

> ! Missing $ inserted.  
>  <inserted text>  
>            $  
>l.147   9.0044314\times  
>pandoc: Error producing PDF
>Error: pandoc document conversion failed with error 43
>Execution halted

I guess the problem is the pdflatex engine that has a trouble in displaying the small p-value in exponential notation. I resolved the issue by clicking on the gear symbol next to the knit button. After that the under the output options, advanced tab I changed the LaTeX Engine to lualatex, or you can just report the p-value as p < 0.001.

And my problem got fixed.

Further Readings:

by (36.1k points)  
2,183 questions
2,487 answers
241 users