是否可以更改为documentclass';scrbook&x27;在bookdown?

是否可以更改为documentclass';scrbook&x27;在bookdown?,r,pandoc,bookdown,R,Pandoc,Bookdown,我想将documentclass更改为“scrbook”。在最小bookdown示例的index.Rmd文件中,我将行documentclass:book更改为documentclass:scrbook,但这不起作用。我收到以下错误消息: Latexmk: applying rule 'pdflatex'... Latexmk: This is Latexmk, John Collins, 19 Jan. 2017, version: 4.52c. Rule 'pdflatex': File c

我想将documentclass更改为“scrbook”。在最小bookdown示例的index.Rmd文件中,我将行
documentclass:book
更改为
documentclass:scrbook
,但这不起作用。我收到以下错误消息:

Latexmk: applying rule 'pdflatex'...
Latexmk: This is Latexmk, John Collins, 19 Jan. 2017, version: 4.52c.
Rule 'pdflatex': File changes, etc:
   Non-existent destination files:
      'test-bookdown.pdf'
------------
Run number 1 of rule 'pdflatex'
------------
------------
Running '/Library/TeX/texbin/xelatex  -halt-on-error -interaction=batchmode -recorder  "test-bookdown.tex"'
------------
This is XeTeX, Version 3.14159265-2.6-0.99998 (TeX Live 2017) (preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
=== TeX engine is 'XeTeX'
Latexmk: Errors, so I did not complete making targets
Latexmk: Log file says no output from latex
Latexmk: For rule 'pdflatex', no output was made
Collected error summary (may duplicate other messages):
  pdflatex: Command for 'pdflatex' gave return code 1
      Refer to 'test-bookdown.log' for details
Latexmk: Use the -f option to force complete processing,
 unless error was exceeding maximum runs of latex/pdflatex.
! LaTeX Error: Command \subtitle already defined.
               Or name \end... illegal, see p.192 of the manual.

Error: Failed to compile test-bookdown.tex. See test-bookdown.log for more info.
Please delete test-bookdown.Rmd after you finish debugging the error.
Execution halted

Exited with status 1.
除了(文章、报告、书籍、回忆录)支持的文档类之外,还有其他文档类可以更改吗

我使用命令
rmarkdown::render\u site(输出格式='bookdown::pdf\u book',编码='UTF-8')
进行编译,如
buildbook
选项卡所提供

R version 3.4.2 (2017-09-28)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

loaded via a namespace (and not attached):
 [1] compiler_3.4.2       backports_1.1.1      bookdown_0.5.4       magrittr_1.5         rprojroot_1.2       
 [6] htmltools_0.3.6      tools_3.4.2          yaml_2.1.14          Rcpp_0.12.13         stringi_1.1.5       
[11] rmarkdown_1.6.0.9004 knitr_1.17           stringr_1.2.0        digest_0.6.12        evaluate_0.10.1  

> rmarkdown::pandoc_version()
[1] ‘1.19.2.1’
> system('pdflatex --version')
pdfTeX 3.14159265-2.6-1.40.18 (TeX Live 2017)
kpathsea version 6.2.3
Copyright 2017 Han The Thanh (pdfTeX) et al.
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: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.29; using libpng 1.6.29
Compiled with zlib 1.2.11; using zlib 1.2.11
Compiled with xpdf version 3.04

我在中的
bookdownbook中使用了
scrbook
作为示例。如果您使用搜索按钮搜索了
scrbook
,您就会发现它。我不打算在这里复制完整的示例,但关键是
template:null
,这是因为rmarkdown的默认Pandoc LaTeX模板不适用于
scrbook
,而Pandoc的LaTeX模板则适用。您当然可以提供自己的Pandoc LaTeX模板