pandoc document conversion failed with error 83

Hi everybody,

I am new to the community so please excuse me if I am not clear enough.

I am using bookdown. Suddenly I get this message and I can no longer build the pdf_book even though it was working normally before. I can still build the html version of the book though.

Error running filter C:\Users\bramucci\Documents\R\win-library\4.1\rmarkdown\rmarkdown\lua\latex-div.lua:
...\R\win-library\4.1\rmarkdown\rmarkdown\lua\latex-div.lua:52: attempt to index a nil value (field '?')
stack traceback:
Fehler: pandoc document conversion failed with error 83
Ausf�hrung angehalten

Exited with status 1.

I am using R version 4.1.3, RStudio 2022.2.1.461, rmarkdown 2.14, bookdown 0.26 and tinytex 0.39. I also want to point out that in other projects I can build the book in pdf and html with no problems so the issue seems to be specific to this particular project. Can anyone help me decipher the error message? Suggestions are warmly welcomed.

It seems to be a encoding issue somewhere.

Can you check if your input file is in UTF-8 ?
Can you share the markdown source code that correspond to this text above ?

Hi @cderv ,

thanks for your quick reply! The encoding is in in UTF-8


That sentence is an error message saying that the execution was stopped, it is not contained in the input file, if I understand you right. It is also difficult to share the file (or to present a reprex) because it is a bookdown with 15 .rmd files. I would like to repeat that until recently I could build the book in pdf the html but now only in html. Let me know if I can offer further details. Many thanks!

Sorry I missed this part of the error message.

Are you using custom blocks somewhere, specifically using data-latex= or latex=?

One of theme is throwing this issue. Can you spot theme in your code and share their content ?
Or try to see if one of them could cause issue ? (special content in first line of block or else ...)

If you don't mind doing that, you could share your project in a Github repository so that I can look at.

it could be due to an update in one of the external tool in the tech layers. Please update bookdown and ** rmarkdown** to latest version, as it could solve any new Pandoc compatibility issue.

Hi @cderv,

Yes, we are using several custom blocks as shown in 9.6.2 Adding a shaded box, some with black some with blue background, some of which include also citations, math notations and urls. Here a reprex:

Some text 

:::: {.blackbox data-latex=""}
::: {.center data-latex=""}
**A title**\newline

As noted by @author, $a = b + c$


Some more text 

:::: {.bluebox data-latex=""}
Link to the app:

Ps. in the .blackbox I am reporting the title in the main body of the custom block because I would like to have it justified to the left. There is probably a more elegant way to do that.

Maybe is that one causing the issue?

This is how we define the environment in preamble.tex using the LaTex framed package and xcolor for custom colors.


\definecolor{ShinyBlue}{RGB}{190, 213, 250}
\definecolor{ShinyBlueText}{RGB}{20, 130, 181}
\definecolor{greyBox}{RGB}{245, 245, 245}

colback = greyBox,
colframe = greyBox,
coltext = black,
boxsep = 5pt,
arc = 4pt

% The blue box
colback = ShinyBlue,
colframe = ShinyBlue,
coltext = ShinyBlueText,
boxsep = 5pt,
arc = 4pt,
box align = center,
halign = center,
valign = center

I don't report the CSS because the html is working just fine but if there is need I can also show that.

Here the link to our GitHub repo if you want to take a look. That would be great, of course. We are developing the pdf in the pdf_version branch.

Many thanks!

A quick update. I have removed this part (the title of the custom block that was left empty) and now we are able to build the pdf again :tada: :confetti_ball:

So the problem seem exactely this, as pointed by @cderv!


Oh great.

But I am lost here: Is this something we should support better ? Or is this an issue in the way you had written the content ?

If you think there is something we should take care off, I'll look at it.

What that is for ? What is it suppose to create in LaTeX ? Should we support that ?
I think it will write that, but does that makes sense ?


This is an issue related to the way I had written the code, I suppose. I simply wanted to have the title of the custom .blackbox to the left and not centered.

The simplest way is just to type the title to the main body of the custom block, as in 2.

  1. This works fine but the title is centered:
:::: {.blackbox data-latex=""}
::: {.center data-latex=""}
**A title**

Some text

  1. This is what I wanted:
:::: {.blackbox data-latex=""}

**A title**\newline

Some text

  1. This throws the error message:
:::: {.blackbox data-latex=""}
::: {.center data-latex=""}

**A title**\newline

Some text


In case 3., ::: {.center data-latex=""} ::: has no use at all. I have simply forgot to delete it but it was working fine before. Personally, I don't see the need to include anything. I was just a bit confused. I hope I was clear :sweat_smile: thanks for the support.

Oh I understand !

i'll see if I need to add a check for empty div - we should probably ignore that better.

Thank you for the examples

Ah ok, so that was an empty div problem. Good to remember!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.