Closed FelipeCarrillo closed 7 years ago
Please provide the following info:
devtools::session_info('bookdown')
system2('xelatex', '--version')
There should be a log file named bookdown-demo.log
, and it is also helpful for me to take a look at it.
devtools::session_info('bookdown') Session info ------------------------------------------------------------------------ setting value
version R version 3.3.2 (2016-10-31) system i386, mingw32
ui RStudio (1.0.136)
language (EN)
collate English_United States.1252
tz America/Los_Angeles
date 2016-12-03
Packages ----------------------------------------------------------------------------
package * version date source
backports 1.0.4 2016-10-24 CRAN (R 3.3.2)
base64enc 0.1-3 2015-07-28 CRAN (R 3.3.0)
bitops 1.0-6 2013-08-17 CRAN (R 3.3.0)
bookdown 0.3.1 2016-12-03 Github (rstudio/bookdown@a18d429)
caTools 1.17.1 2014-09-10 CRAN (R 3.3.1)
digest 0.6.10 2016-08-02 CRAN (R 3.3.1)
evaluate 0.10 2016-10-11 CRAN (R 3.3.2)
highr 0.6 2016-05-09 CRAN (R 3.3.1)
htmltools 0.3.5 2016-03-21 CRAN (R 3.3.1)
jsonlite 1.1 2016-09-14 CRAN (R 3.3.2)
knitr 1.15.1 2016-11-22 CRAN (R 3.3.2)
magrittr 1.5 2014-11-22 CRAN (R 3.3.1)
markdown 0.7.7 2015-04-22 CRAN (R 3.3.1)
mime 0.5 2016-07-07 CRAN (R 3.3.1)
Rcpp 0.12.8 2016-11-17 CRAN (R 3.3.2)
rmarkdown 1.2 2016-11-21 CRAN (R 3.3.2)
rprojroot 1.1 2016-10-29 CRAN (R 3.3.2)
stringi 1.1.2 2016-10-01 CRAN (R 3.3.2)
stringr 1.1.0 2016-08-19 CRAN (R 3.3.1)
yaml 2.1.14 2016-11-12 CRAN (R 3.3.2)
############################################################
system2('xelatex', '--version') MiKTeX-XeTeX 2.9.6050 (0.99996) (MiKTeX 2.9) (C) 1994-2008 by SIL International, (C) 2009-2012 by Jonathan Kew, (C) 2010-2012 by Han Han The Thanh, (C) 2012-2013 by Khaled Hosny TeX is a trademark of the American Mathematical Society. compiled with zlib version 1.2.8; using 1.2.8 compiled with libpng version 1.6.24; using 1.6.24 compiled with poppler version 0.46.0 compiled with jpeg version 8.4 compiled with fontconfig version 2.12; using 2.12 compiled with FreeType2 version 2.6.5; using 2.6.5 compiled with Graphite2 version 1.3.8; using 1.3.8 compiled with ICU version 57.1; using 57.1 compiled with HarfBuzz version 1.3.0; using 1.3.0 using TECkit version 2.4
The log does not seem to be complete, and I don't know what the error exactly was.
The problem is only with bookdown::pdf. Output created: _book/bookdown-demo.pdf_book Error in tools::file_path_as_absolute(output_file) : file '_book/bookdown-demo.pdf' does not exist But it works well with bookdown::gitbook and bookdown::epub_book
As I said, the problem is I don't know what exactly went wrong with xelatex. Your LaTeX log didn't show the error.
I am having a similar issue, unable to compile the demo book out of the box. I should note that the exact error I am getting has changed since I re-installed MikTex and ensured all packages were updated. I was receiving the same error with the CRAN version of bookdown, but there I was able to select only a gitbook and that worked fine. Here are the results of clicking "Build Website" (only option after installing development version?) ==> rmarkdown::render_site(encoding = 'UTF-8')
|....... | 11% inline R code fragments
|.............. | 22% label: unnamed-chunk-1 (with options) List of 1 $ eval: logi FALSE
processing file: bookdown-demo.Rmd |...................... | 33% ordinary text without R code
|............................. | 44% label: unnamed-chunk-2 (with options) List of 1 $ include: logi FALSE
|.................................... | 56% ordinary text without R code
|........................................... | 67% label: nice-fig (with options) List of 4 $ fig.cap : chr "Here is a nice figure!" $ out.width: chr "80%" $ fig.asp : num 0.75 $ fig.align: chr "center"
|................................................... | 78% ordinary text without R code
|.......................................................... | 89% label: nice-tab (with options) List of 1 $ tidy: logi FALSE
|.................................................................| 100% inline R code fragments
"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS bookdown-demo.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output bookdown-demo.tex --table-of-contents --toc-depth 2 --template "C:\Users\Drew\Documents\R\win-library\3.3\rmarkdown\rmd\latex\default-1.17.0.2.tex" --number-sections --highlight-style tango --latex-engine xelatex --natbib --include-in-header preamble.tex --variable graphics=yes --variable "geometry:margin=1in" --variable tables=yes --standalone --bibliography book --bibliography packages output file: bookdown-demo.knit.md
! Undefined control sequence. l.17 \sys_if_engine_luatex:T
Error: Failed to compile bookdown-demo.tex. See bookdown-demo.log for more info. In addition: Warning message: running command '"xelatex" -halt-on-error -interaction=batchmode "bookdown-demo.tex"' had status 1 Execution halted
Exited with status 1.
Requested information below.
devtools::session_info('bookdown') Session info ------------------------------------------------------ setting value
version R version 3.3.2 (2016-10-31) system x86_64, mingw32
ui RStudio (1.0.136)
language (EN)
collate English_United States.1252
tz America/Chicago
date 2016-12-22
Packages ----------------------------------------------------------
package * version date source
backports 1.0.4 2016-10-24 CRAN (R 3.3.2)
base64enc 0.1-3 2015-07-28 CRAN (R 3.2.3)
bitops 1.0-6 2013-08-17 CRAN (R 3.2.2)
bookdown 0.3.5 2016-12-22 Github (rstudio/bookdown@f9ae75e)
caTools 1.17.1 2014-09-10 CRAN (R 3.2.2)
digest 0.6.10 2016-08-02 CRAN (R 3.3.2)
evaluate 0.10 2016-10-11 CRAN (R 3.3.2)
highr 0.6 2016-05-09 CRAN (R 3.3.2)
htmltools 0.3.5 2016-03-21 CRAN (R 3.3.1)
jsonlite 1.1 2016-09-14 CRAN (R 3.3.2)
knitr 1.15.1 2016-11-22 CRAN (R 3.3.2)
magrittr 1.5 2014-11-22 CRAN (R 3.2.2)
markdown 0.7.7 2015-04-22 CRAN (R 3.2.2)
mime 0.5 2016-07-07 CRAN (R 3.3.2)
Rcpp 0.12.8 2016-11-17 CRAN (R 3.3.2)
rmarkdown 1.3 2016-12-21 CRAN (R 3.3.2)
rprojroot 1.1 2016-10-29 CRAN (R 3.3.2)
stringi 1.1.2 2016-10-01 CRAN (R 3.3.2)
stringr 1.1.0 2016-08-19 CRAN (R 3.3.2)
yaml 2.1.14 2016-11-12 CRAN (R 3.3.2)
MiKTeX-XeTeX 2.9.6100 (0.99996) (MiKTeX 2.9.6100 64-bit) (C) 1994-2008 by SIL International, (C) 2009-2012 by Jonathan Kew, (C) 2010-2012 by Han Han The Thanh, (C) 2012-2013 by Khaled Hosny TeX is a trademark of the American Mathematical Society. compiled with zlib version 1.2.8; using 1.2.8 compiled with libpng version 1.6.24; using 1.6.24 compiled with poppler version 0.46.0 compiled with jpeg version 8.4 compiled with fontconfig version 2.12; using 2.12 compiled with FreeType2 version 2.6.5; using 2.6.5 compiled with Graphite2 version 1.3.8; using 1.3.8 compiled with ICU version 57.1; using 57.1 compiled with HarfBuzz version 1.3.0; using 1.3.0 using TECkit version 2.4
I have attached the log file here: bookdown-demo.txt
And while I'm at it, here is the tex file:
@atyre2 I just googled the error message and got this: http://tex.stackexchange.com/q/306246/9128
Thank you! following the instructions in the comment fixes the problem. I'm embarrassed to admit that I looked at that post, and went right past the solution into the updating stuff linked in another comment.
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.
Hi; I have followed step by step instructions from the bookdown page but I still am getting the error below. I downloaded the github files to my desktop and under rstudio options selected knitr and xelatex.
Output created: _book/bookdown-demo.pdf Error in tools::file_path_as_absolute(output_file) : file '_book/bookdown-demo.pdf' does not exist Calls: ... render_book -> render_cur_session -> ->
In addition: Warning messages:
1: running command '"xelatex" -halt-on-error -interaction=batchmode "bookdown-demo.tex"' had status 1
2: running command '"xelatex" -halt-on-error -interaction=batchmode "bookdown-demo.tex"' had status 1
3: running command '"xelatex" -halt-on-error -interaction=batchmode "bookdown-demo.tex"' had status 1
Execution halted