第 2 章 輸出論文

2.1 匯入論文模板

在 console 執行:

ntuthesis::import_template("project_name")

接著將該資料夾變更為 bookdown 專案(working dir 需為該專案資料夾):

ntuthesis::init_proj()  # init working dir as proj.

詳細的檔案結構,見 3.1

2.2 編輯封面

_person-info.yml輸入個人資料後,並且確定電腦上有標楷體Times New Roman 這兩種字體(Windows 有內建這兩種字體)。若無,請將_person-info.yml中:

#cjk-mainfont: 'AR PL KaitiM Big5'  # Default, 標楷體
#en-mainfont: 'Liberation Serif'  # Default, Times New Roman

修改為其它電腦上的字體,例如:

cjk-mainfont: 'Noto Serif CJK TC'  # Default, 標楷體
en-mainfont: 'Liberation Serif'  # Default, Times New Roman

接著執行:

ntuthesis::comp_front()

即會在 front-matter/ 生成封面所需的檔案。以使用者的角度而言,除了 front-matter/certification.pdf 以外,不須理會 front-matter/ 中的其它檔案。certification.pdf 是空白(未簽名)的「口試委員審定書」。

使用者可以將 front-matter/certification.pdf 列印出來。之後再將簽名過的「口試委員審定書」掃描成 PDF 並命名為 certification-scan.pdf ,取代原本專案資料夾的同名檔案。

2.3 Compile 論文

如同前述(2.2),在輸出論文時,需確保系統上已安裝標楷體Times New Roman,若無,請依 2.2 修改 index.Rmd yaml 中的

#cjk-mainfont: 'AR PL KaitiM Big5'  # Default: 標楷體
...
#en-mainfont: 'Liberation Serif'  # Default: Times New Roman

接著用 RStudio Build Pane 裡的 button 輸出論文:

透過 RStudio 輸出論文

圖 2.1: 透過 RStudio 輸出論文

或是在 console 執行下方指令:

bookdown::render_book("index.Rmd", "bookdown::gitbook")
bookdown::render_book("index.Rmd", "bookdown::pdf_book")

如此便會在 _book/ 中生成完整的論文(gitbook 和 PDF 格式)。