Description
I have installed Preview Release 1.1.331 of RStudio IDE on Ubuntu 16.04.3 LTS.
Installed devtools and bookdown as decribed on getting-started page.
I have installed texlive-xetex package on my system.
I can produce HTML, PDF and EPUB from rstudio/bookdown-demo.git.
Then I cloned rstudio/bookdown.git to build PDF of your great book.
I opened inst/examples/index.Rmd from RStudio.
I ran this file with <Ctrl+Alt+R> and clicked Knit. It compiled HTML version, but buttons PDF, EPUB and MOBI open empty white windows (there are no such files in _book directory).
So I tried to build PDF and EPUB with _render.R script as described in Makefile - I opened _render.R and clicked Source in the editor.
Here I got error message:
output file: bookdown.knit.md
Error: Functions that produce HTML output found in document targeting latex output.
Please change the output type of this document to HTML. Alternatively, you can allow
HTML output in non-HTML formats by adding this option to the YAML front-matter of
your rmarkdown file:
always_allow_html: yes
Note however that the HTML output will not be visible in non-HTML formats.
Please delete bookdown.Rmd after you finish debugging the error.
Execution halted
Error in eval(expr, envir, enclos) :
Failed to compile the book to bookdown::pdf_book
If I run make
from terminal in the inst/examples/ folder I get another error:
$ make
Rscript --quiet _render.R "bookdown::pdf_book"
Error: Functions that produce HTML output found in document targeting latex output.
Please change the output type of this document to HTML. Alternatively, you can allow
HTML output in non-HTML formats by adding this option to the YAML front-matter of
your rmarkdown file:
always_allow_html: yes
Note however that the HTML output will not be visible in non-HTML formats.
In addition: Warning message:
In verify_rstudio_version() :
Please install or upgrade Pandoc to at least version 1.17.2; or if you are using RStudio, you can just install RStudio 1.0+.
Please delete bookdown.Rmd after you finish debugging the error.
Execution halted
Error: Failed to compile the book to bookdown::pdf_book
Execution halted
Makefile:2: recipe for target 'pdf' failed
make: *** [pdf] Error 1
I have pandoc 1.16.0.2 installed in my system (from official repository).
Removing bookdown.Rmd does not help.
Debug and version info:
> devtools::session_info('bookdown')
Session info ------------------------------------------------------------------------------------------------------------------------------
setting value
version R version 3.2.3 (2015-12-10)
system x86_64, linux-gnu
ui RStudio (1.1.331)
language en_US
collate en_US.UTF-8
tz W-SU
date 2017-08-12
Packages ----------------------------------------------------------------------------------------------------------------------------------
package * version date source
backports 1.1.0 2017-05-22 cran (@1.1.0)
base64enc 0.1-3 2015-07-28 cran (@0.1-3)
bitops 1.0-6 2013-08-17 cran (@1.0-6)
bookdown 0.4.2 2017-08-12 Github (rstudio/bookdown@2741261)
caTools 1.17.1 2014-09-10 cran (@1.17.1)
digest 0.6.12 2017-01-27 CRAN (R 3.2.3)
evaluate 0.10.1 2017-06-24 cran (@0.10.1)
highr 0.6 2016-05-09 cran (@0.6)
htmltools 0.3.6 2017-04-28 cran (@0.3.6)
jsonlite 1.5 2017-06-01 CRAN (R 3.2.3)
knitr 1.17 2017-08-10 cran (@1.17)
magrittr 1.5 2014-11-22 cran (@1.5)
markdown 0.8 2017-04-20 cran (@0.8)
methods * 3.2.3 2016-01-14 local
mime 0.5 2016-07-07 CRAN (R 3.2.3)
Rcpp 0.12.12 2017-07-15 cran (@0.12.12)
rmarkdown 1.6 2017-06-15 cran (@1.6)
rprojroot 1.2 2017-01-16 cran (@1.2)
stats * 3.2.3 2016-01-14 local
stringi 1.1.5 2017-04-07 cran (@1.1.5)
stringr 1.2.0 2017-02-18 cran (@1.2.0)
tools 3.2.3 2016-01-14 local
utils * 3.2.3 2016-01-14 local
yaml 2.1.14 2016-11-12 cran (@2.1.14)
> rmarkdown::pandoc_version()
[1] ‘1.19.2.1’
> system('pdflatex --version')
pdfTeX 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian)
kpathsea version 6.2.1
Copyright 2015 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty. Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.6.17; using libpng 1.6.17
Compiled with zlib 1.2.8; using zlib 1.2.8
Compiled with poppler version 0.41.0
I got this bug with stable versions of RStudio 1.0.153 and bookdown 0.4 too.
How to compile PDF of your book? Is it a bug? What am I doing wrong?