I use bookdown to render html books. How can render the same book using LaTeX enging xelatex instead of pdflatex?
This is the main code I use:
bookdown::render_book('index.Rmd', output_file='mybook.pdf','bookdown::pdf_book')
It keeps on saying ! Sorry, but C:\PROGRA~1\MIKTEX~1.9\miktex\bin\x64\pdflatex.exe did not succeed.
. Because when rendering other kinds of pdf documents I use xelatex as an enging, I know it should be available in my system. How can I force bookdown to use xelatex?
Here this answer seemed to be asked before, but I have no idea how to use the mentioned solution: pandoc_options(args = c("--latex-engine", "xelatex"))
.
When I do something like this:
bookdown::render_book('index.Rmd', output_file='mybook.pdf','bookdown::pdf_book',pandoc_options(latex_engine = 'xelatex'))
There is an error: Error in pandoc_options(latex_engine = "xelatex") : argument "to" is missing, with no default
Does anyone know how to deal with this problem?