43 views

## 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
| 43 views

## 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.