pzhaonet / bookdownplus

The easiest way to use R package bookdown for writing varied types of books and documents
MIT License
253 stars 31 forks source link

Error in yaml::yaml.load(..., eval.expr = TRUE) #53

Open MatixR opened 4 years ago

MatixR commented 4 years ago

Hi, When I try to use the paper_zh on Mac OS , I meet a problem with YAML.

I use the flowing code to generate the template. bookdownplus(template = 'paper_zh', to = "chinese_paper", render = FALSE) ,

When I try to produce a pdf document, I find the following erorr:

n*** Successfully loaded .Rprofile ***n Error in yaml::yaml.load(..., eval.expr = TRUE) : Parser error: while parsing a block mapping at line 12, column 3 did not find expected key at line 20, column 4 Calls: <Anonymous> ... parse_yaml_front_matter -> yaml_load -> <Anonymous> Execution halted

By the way, I have changed the YAML setup in the index.md .

output: bookdown::pdf_book:

includes:

before_body: abstract.tex

keep_tex: yes dev: "cairo_pdf" citation_package: natbib latex_engine: xelatex # for chinese

template: tex/template_paper_zh.tex

template: tex/template_paper_zh_mac.tex # for macOS #------ I use the tex template for macOS pandoc_args: --top-level-division=chapter toc_depth: 3 toc_unnumbered: no toc_appendix: yes quote_footer: ["\begin{flushright}", "\end{flushright}"] documentclass: article bibliography: [bib/bib.bib] biblio-style: apalike link-citations: yes colorlinks: no

toc: no

lot: no lof: no geometry: [a4paper] site: bookdown::bookdown_site

description: "chemistry"

github-repo: dapengde/bookdown-chemistry

cover-image: images/cover.jpg

pzhaonet commented 4 years ago

I am sorry that I don't have a mac and this issue cannot be tested.