首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >为什么它会提示“mapping values are not allowed in this context at line 2, column 7”打开bookdown-chinese.Rproj?

为什么它会提示“mapping values are not allowed in this context at line 2, column 7”打开bookdown-chinese.Rproj?
EN

Stack Overflow用户
提问于 2018-05-31 04:10:59
回答 1查看 0关注 0票数 0

为什么mapping values are not allowed in this context at line 2, column 7在打开Bookdown的bookdown-chinese.Rproj时提示我?

下载并取出bookdown-chinese-master.zip文件后未做任何更改。

整个错误提示:

代码语言:javascript
复制
[1] "LC_COLLATE=Chinese (Simplified)_China.936;LC_CTYPE=Chinese 
(Simplified)_China.936;LC_MONETARY=Chinese 
(Simplified)_China.936;LC_NUMERIC=C;LC_TIME=Chinese (Simplified)_China.936"
 Error in yaml::yaml.load(string, ...) : 
Scanner error: mapping values are not allowed in this context at line 2, column 7

sessionInfo()

代码语言:javascript
复制
R version 3.5.0 (2018-04-23)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936 
[2] LC_CTYPE=Chinese (Simplified)_China.936   
[3] LC_MONETARY=Chinese (Simplified)_China.936
[4] LC_NUMERIC=C                              
[5] LC_TIME=Chinese (Simplified)_China.936    

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

loaded via a namespace (and not attached):
[1] compiler_3.5.0  backports_1.1.2 magrittr_1.5    rprojroot_1.3-2 
htmltools_0.3.6
[6] tools_3.5.0     yaml_2.1.19     Rcpp_0.12.16    stringi_1.1.7   
rmarkdown_1.9  
[11] knitr_1.20      stringr_1.3.1   digest_0.6.15   evaluate_0.10.1

_output.yml的内容

代码语言:javascript
复制
bookdown::gitbook:
  css: css/style.css
  config:
    toc:
    collapse: none
    before: |
       <li><a href="./">中文书示例</a></li>
    after: |
      <li><a href="https://bookdown.org" target="blank">本书由 bookdown 强力驱 
     动</a></li>
  download: [pdf, epub]
  edit: https://github.com/yihui/bookdown-chinese/edit/master/%s
  sharing:
    github: yes
    facebook: no
bookdown::pdf_book:
   includes:
   in_header: latex/preamble.tex
   before_body: latex/before_body.tex
   after_body: latex/after_body.tex
 keep_tex: yes
 dev: "cairo_pdf"
 latex_engine: xelatex
 citation_package: natbib
 template: latex/template.tex
 pandoc_args: "--top-level-division=chapter"
 toc_depth: 3
 toc_unnumbered: no
 toc_appendix: yes
 quote_footer: ["\\begin{flushright}", "\\end{flushright}"]
bookdown::epub_book:
  stylesheet: css/style.css

_bookdown.yml的内容

代码语言:javascript
复制
 book_filename: bookdown
 clean: [packages.bib, bookdown.bbl]
 language:
   label:
     fig: "图 "
     tab: "表 "
  ui:
    edit: "编辑"
    chapter_name: ["第 ", " 章"]
EN

回答 1

Stack Overflow用户

发布于 2018-05-31 13:12:21

代码语言:txt
复制
bookdown::gitbook:
  css: style.css
  split_by: chapter
  config:
    toc:
      collapse: subsection
      before: |
        <li><a href="./">A Minimal Bookdown Book</a></li>
      after: |
        <li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>
bookdown::pdf_book:
  includes:
    in_header: preamble.tex
  latex_engine: xelatex
  citation_package: biblatex
bookdown::epub_book:
  stylesheet: style.css
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/-100004649

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档