Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
494 views
in Technique[技术] by (71.8m points)

r markdown - YAML error when knitting with one new line of code adding single bibliography line

following yaml line of code (Code is at line 10 and line 9 and 11 through 13 are blank where the yaml ends)

bibliography:dcf_bibliography.bib

when knitting to PDF format which knits fine without the line of code

results in this error

messageError in yaml::yaml.load(..., eval.expr = TRUE) : 
  Scanner error: while scanning a simple key at line 9, column 3 could not find expected ':' at line 12, column 5
Calls: <Anonymous> ... parse_yaml_front_matter -> yaml_load -> <Anonymous>
Execution halted
question from:https://stackoverflow.com/questions/65878099/yaml-error-when-knitting-with-one-new-line-of-code-adding-single-bibliography-li

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

There is a space missing after the colon. Fix it like this:

bibliography: dcf_bibliography.bib

It is not certain this is the only error as you don't show the whole YAML file.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...