# error building book with horizontal line in markdown

When I try to add a horizontal line to my book using markdown, the build process fails.

Below is the code for a horizontal line in Markdown:

--- on a line by itself.

Here is the error I get:

! Missing number, treated as zero.
\protect
l.145 ...nter}\rule{0.5\linewidth}{\linethickness}
\end{center}

Error: Failed to compile bookdown-demo.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See bookdown-demo.log for more info.
Execution halted

Exited with status 1.


It appears that this is a bug in Pandoc, fixed in 2.8. Does anybody know if Pandoc will be updated in Rstudio/bookdown any time soon, or should I figure out how to install and use a different version of Pandoc locally?

Bookdown does not come with a pandoc installation. RStudio IDE does. You can install your own pandoc version and configure Rmarkdown to use it (or just make it available in PATH I guess...)

1 Like

Thanks. I was just assuming that bookdown targeted the version of Pandoc included with Rstudio, so both might need changes for Pandoc in Rstudio to be updated.

Unfortunately I’m running into other problems using the latest version of Pandoc, but that’s a separate issue.

1 Like

I guess my root problem really isn't answered. I still can't build books with a horizontal rule in them. Do you have any suggestions for how to do that?

I've installed the latest version of Pandoc (2.9) on my mac (using homebrew to do so).

However, now that I'm running latest version, when I attempt to build the demo book, I get the following error:

pandoc-citeproc: Error in \$: Incompatible API versions: encoded with [1,20] but attempted to decode with [1,17,0,4].
CallStack (from HasCallStack):
error, called at ./Text/Pandoc/JSON.hs:113:48 in pandoc-types-1.17.0.4-JUbKfxLZkCY3AkhtmFEGjK:Text.Pandoc.JSON
Error running filter /usr/local/bin/pandoc-citeproc:
Filter returned error status 1
Error: pandoc document conversion failed with error 83
Execution halted

Exited with status 1.

I figured maybe I needed to update pandoc-citeproc to the latest version, too, so I installed that (version 0.16.4) with Brew as well. That doesn't seem to help, though.

It appears maybe I need to install the latest version of pandoc-types? But there is no brew recipe for this, so I don't really know how to install it. Plus, I don't know if that will fix the problem.

Can anybody help me build a book with a simple horizontal rule in it?

Like that ^ !