2017-07-22 71 views
2

在。 rmd文件,用於與YAML線順利地編譯,在YAML`in_header中包含多個文件:`

output: 
    pdf_document: 
    fig_caption: yes 
    keep_tex: yes 
    number_sections: yes 
    includes: 
     in_header: mystyles.tex spacing.tex 
... 

現在我得到這樣mystyles.tex spacing.tex cannot be found 我現在,使用R 3.3.2和R工作室1.0.153一個pandoc錯誤。我也嘗試了其他幾種形式(這給了不同的錯誤):

 in_header: "mystyles.tex" "spacing.tex" 

     in_header: mystyles.tex 
     in_header: spacing.tex 

它的工作原理,如果我合併的兩個文件乳膠代碼,只需使用

 in_header: mystyles.tex 

什麼是多重的語法文件在in_header行嗎?它改變了嗎?

回答

3

您必須對向量(數組)使用YAML語法。無論是

["mystyles.tex", "spacing.tex"] 

- mystyles.tex 
- spacing.tex 

應該罰款。請記得在後一種情況下正確縮進in_header下的列表。