Mariana
Mariana

Reputation: 21

Bookdown/rmarkdown: "Could not find data file templates/--number-sections.latex Error: pandoc document conversion failed with error 97"

Following: render_book("index.Rmd") I was getting this other error associated with three part table: LaTeX Error: Environment ThreePartTable undefined I applied the solution suggested there(remotes::install_github('rstudio/rmarkdown')). Now I have this error: "Could not find data file templates/--number-sections.latex Error: pandoc document conversion failed with error 97"

My index.Rmd looks like this:

title: "Figures and Tables"
author: "name"
date: "`r Sys.Date()`"

output:
  bookdown::pdf_book:
    includes:
      in_header: preamble.tex
    keep_tex: yes
    citation_package: natbib
fontsize: 12pt
classoption: oneside
linestretch: 2
documentclass: book
bibliography: "bibs.bib"
biblio-style: "apalike"
geometry: "left=1.5in, right=1in, top=1in, bottom=1in"
---

preamble.tex has:

\usepackage[none]{hyphenat}
\usepackage{booktabs}
\pagestyle{plain}
\raggedbottom 

While render_book("index.Rmd") does not generate a pdf and gives me this pandoc error, it successfully generates a merged markdown file "FiguresTables.Rmd." When I try to knit the merged file it works, it does generate the pdf. I just cannot figure-out why I am unable to generate the pdf from render_book("index.Rmd").

Upvotes: 0

Views: 2055

Answers (1)

Mariana
Mariana

Reputation: 21

Never mind! Writing the question made me think of an answer. I just re-installed r-markdown from the cran repository instead of github and tried again. And it works fine now.

Upvotes: 2

Related Questions