0
當使用knitr將.Rnw文件轉換爲.tex文件時,我試圖使用一個科學名稱。運行knit
時出現錯誤。這是我的包含文件.Rnw內我的代碼(需要taxize
和stringr
庫運行):在一個Rnw文件中混合使用R和LaTeX代碼
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum \Sexpr{str_c("Collared Flycatchers (\\textit{", comm2sci(commnames='Collared Flycatcher', db="itis")[[1]], "})")[1]}
在.tex文件輸出應該是:
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum Collared Flycatchers (\textit{Ficedula semitorquata})
我怎樣才能得到這個輸出在.tex文件中?
does http://stackoverflow.com/questions/14124022/setting-html-meta-elements-with-knitr help? –
我會想象有比這更簡單的方法,我還沒有弄清楚 – luciano