Open ChenChingChih opened 3 years ago
你好,我自行補上字體後出現以下錯誤,但不知道該怎麼解決... 我有回去試之前跑成功的檔案,但都出現相同的問題... 我的github專案 可以跑出gitbook但無法生成pdf檔
! Extra \endgroup. \document ->\endgroup \let \BeforeStartOfDocument \@firstofone \cpt@beforest... l.205 \begin{document}
���~: LaTeX failed to compile ntu-bookdown.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See ntu-bookdown.log for more info. ���~: Warning message: In citation_package_arg(citation_package) : citation_package = 'none' was deprecated; please use 'default' instead. �������
Exited with status 1.
我有回去試之前跑成功的檔案,但都出現相同的問題... 我的github專案 可以跑出gitbook但無法生成pdf檔
套件內建一個下載字體的函數 或許可以試試 https://yongfu.name/ntuthesis/reference/download_fonts.html
感謝,字體部分已解決 但還有一個不知道該如何處理的錯誤 ! Extra \endgroup. \document ->\endgroup \let \BeforeStartOfDocument \@firstofone \cpt@beforest... l.205 \begin{document}
���~: LaTeX failed to compile ntu-bookdown.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See ntu-bookdown.log for more info.
似乎是因為 latex 更新的關係,浮水印的套件會失效
https://tex.stackexchange.com/questions/566088/xwatermark-throws-error
或許可以試試依照他的方式去修改 template.tex
浮水印的部份
或是使用舊版的 TinyTex (http://bit.ly/TinyTeX-win)
浮水印有可以直接移除的選項嗎?我想之後再加即可 我到index裡面把浮水印關掉,就成功跑出來了!非常感謝你! 抱歉,我最近要提口試比較心急... tinytex我是用安裝套件(tinytex::install_tinytex())的方式安裝,不確定怎麼樣才能較好的回復舊版
另外想引註你開發的套件可以如何引注呢?
另外想請教相對路徑讀取的問題,因為在讀取範例檔圖片時,會讀不到,是不是要設定讀取路徑呢?因為我在rmarkdown下用knitr同樣設定在rproject下是可以讀取的
Error in knitr::include_graphics(path = c("./fig/Unem.png")) :
Cannot find the file(s): "./fig/Unem.png"
Calls:
看來是要把已下指令關掉,就會回到rpoject的根目錄 knitr::opts_knit$set(root.dir='R')
R Markdown 預設的工作目錄是 .Rmd
檔所在的位置,所以內文撰寫的相對路徑,就是以 .Rmd
所在的資料夾為準
另外想引註你開發的套件可以如何引注呢?
可以參考 https://bookdown.org/yihui/rmarkdown-cookbook/write-bib.html
基本上,透過下方指令就可以印出 .bib
的內容了
toBibtex(citation("ntuthesis"))
@Manual{,
title = {ntuthesis: Bookdown Thesis Template for NTU},
author = {Yongfu Liao},
year = {2021},
note = {https://liao961120.github.io/ntuthesis,
https://github.com/liao961120/ntuthesis},
}
作者你好,我遇到以下問題,再麻煩您處理,感謝!
tlmgr.pl: package log updated: C:/Users/Qoo/AppData/Roaming/TinyTeX/texmf-var/web2c/tlmgr.log ! Package fontspec Error: The font "TimesNewRoman" cannot be found.
! kpathsea:make_tex: Invalid filename `[latex/TimesNewRoman]/OT', contains '['
���~: LaTeX failed to compile ntu-bookdown.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See ntu-bookdown.log for more info. ���~: Warning message: In citation_package_arg(citation_package) : citation_package = 'none' was deprecated; please use 'default' instead. �������
Exited with status 1.