1
votes

I'm trying to type up some statistics notes for one of my classes in bookdown. bookdown is not rendering the text written for any chapter with subsections. There is a bunch of text within each subsection, but it is not showing up when I compile to pdf.

Any ideas about what could be causing the problem?

The only thing that shows up is the section headers for the chapter. Sometimes deleting the files in _book is a workaround, but I can't reproduce the error easily. Everything seems to work, then I add a little text, and then I have the rendering problem. The document seems to compile with no warnings. A screenshot of the what I'm getting is included.

example of problem

I'm running the most current version of RStudio.

Session info:

R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics 
[3] grDevices utils    
[5] datasets  methods  
[7] base     

loaded via a namespace (and not attached):
 [1] compiler_3.6.1 
 [2] bookdown_0.13.2
 [3] htmltools_0.3.6
 [4] tools_3.6.1    
 [5] yaml_2.2.0     
 [6] Rcpp_1.0.2     
 [7] rmarkdown_1.15 
 [8] knitr_1.25     
 [9] xfun_0.9       
[10] digest_0.6.20  
[11] packrat_0.5.0  
[12] evaluate_0.14 

My yaml header is:

title: "A Book"
author: "Frida Gomam"
site: bookdown::bookdown_site
documentclass: book
output:
  bookdown::pdf_book:
    includes:
      in_header: preamble-latex.tex
  # bookdown::gitbook:
  #   includes:
  #     before_body: preamble-mathjax.tex
bibliography: [book.bib]
biblio-style: apalike
1

1 Answers

1
votes

You should click the Build Book button, instead of the Knit button. The latter only previews the current chapter. See documentation here: https://bookdown.org/yihui/bookdown/rstudio-ide.html