Skip to content

Commit

Permalink
Merge pull request #48 from yuhao-kuo/modify-pre-v2.0-readme
Browse files Browse the repository at this point in the history
update the document
  • Loading branch information
yuhao-kuo committed Sep 15, 2021
2 parents 251eb92 + 5a38792 commit b2590a3
Show file tree
Hide file tree
Showing 19 changed files with 354 additions and 115 deletions.
33 changes: 0 additions & 33 deletions Chapters/chapter1.tex

This file was deleted.

28 changes: 25 additions & 3 deletions Chapters/conclusion.tex
Original file line number Diff line number Diff line change
@@ -1,11 +1,33 @@

\chapter{結論} \label{conclusion_and_future}


\section{研究結論}

嗯 結論
\subsection*{產生論文}

經過開發者討論後,決議將論文與封面產生皆由 all 指令產生。

\begin{lstlisting}[language=bash]
make all
\end{lstlisting}

\subsection*{清除暫存}

暫存檔案檔案是由 xelatex 編譯時所產生,使用此指令清除暫存並不會將 PDF 檔案清除。

\begin{lstlisting}[language=bash]
make clean
\end{lstlisting}

\subsection*{完整清除}

完整清除檔案會將所有由 xelatex 編譯產生的檔案完整清除,包含論文與封面的 PDF 檔案。

\begin{lstlisting}[language=bash]
make distclean
\end{lstlisting}

\section{未來展望}

未來這個東西能幹嘛阿? 要做什麼應用阿?之類的
未來,我們也不知道能持續維護多久,只要有人使用,我們就會盡力維護下去。
目前僅支援 Linux,未來將會盡量朝向支援 Windows,讓更多人能使用此專案。
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
\chapter{模擬實驗與結果分析}\label{Experimental_results}
\chapter{圖表與圖片}\label{Experimental_picture}


\section{感測器數量}
\section{圖表}

\ref{fig_tikzpicture_demo}為透過 $LaTeX$ 套件 tikzpicture 繪製出的圖形。圖\ref{fig_nkust} 為 JPEG 格式之圖片。圖\ref{fig_taiwan_symbol} 為去背的 PNG 格式圖案,圖\ref{fig_nkust}\cite{nkust_jpg}與圖\ref{fig_taiwan_symbol}\cite{taiwan_symbol}資料來源為中文維基百科。

Expand Down
99 changes: 99 additions & 0 deletions Chapters/how_to_start.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
\chapter{如何開始撰寫自己的論文內容} \label{ch_how2start}

相信目前的文件數量仍然會讓您在評估上仍許多疑惑,
為了避免讓您在撰寫論文時遇到許多的小問題,本章將會一步步帶著您將本專案修改為您自己的論文。

\section{架構簡介}

本專案所有的設定都盡可能的模組化,讓每個目錄、檔案的操作內容皆能專注在特定的事務上。在開始之前先一一介紹本專案的架構。

\begin{itemize}
\item Chapter - 論文各章節文件
\item Configurations - 論文設定
\item Docs - 專案參考文件
\item Externals - 外部匯入文件
\item Figures - 圖片
\item Fonts - 字體檔案
\item Instance - 論文文章以外的文件
\item Packages - LaTeX package
\item References - 參考文獻
\item Tables - 表格
\item Templates - 版型 sty 檔案
\end{itemize}

需要由使用者自行新增 tex 文件的目錄有 Chapter、Externals、Figures、Tables、References,這些目錄都是放置論文內容的地方,
使用者需要對陸路進行微調的目錄有 Configurations、Instance,其餘目錄則不建議變動。

\section{如何編輯}

\subsection*{Chapter 的新增、刪除、修改}

chapter 是存放內容文件的目錄,考慮到每個人的章節數量不同,因此章節載入及章節順序獨立於 Configurations/chapter.tex 中。
當然您也可以直接在一個文件中完成所有論文章節。

當您要加入一個章節,請先在 Chapters 中建立您的要新增的檔案(以下以 A.tex 作為範例)。
並在 Configurations/chapter.tex 加入這個檔案,讓編譯時被專案引入到檔案中。

\begin{lstlisting}[language=TeX]
\input{Chapters/A.tex}
\end{lstlisting}

接著開始進行文件編輯,在邏輯上我們希望每個章節都存放在不同的 tex 檔案中,因此需要先定義此頁的章節名稱。
接著就可以開始進行論文撰寫了,如您需要更多的小節,可使用 section、subsection、subsubsection 來定義小節。

\begin{lstlisting}[language=TeX]
\chapter{A.tex 範例01}\label{leb1}

\section{小節1}

\subsection{小節1-1}
\subsection{小節1-2}
\subsubsection{小節1-2-1}
\subsubsection{小節1-2-2}
\subsection{小節1-3}
\section{小節2}
\section{小節3}
\end{lstlisting}

當您不希望小節被加入到目錄,您可以使用 * 號來進行忽略目錄號碼。

\begin{lstlisting}[language=TeX]
\subsection*{忽略小節號碼}
\end{lstlisting}

\subsection*{Externals、Figures、Tables}

Externals、Figures 是用來儲存匯入論文的文件、圖片用。Tables 是表格 tex 文件的儲存空間,如表格不大會建議直接將圖表直接放在 chapter 中。

匯入外部 PDF 檔案語法如下,IfFileExists 用於檢查檔案是否存在,檔案存在才會將該檔案進行引入。在編譯時引入一個不存在的檔案,將會造成編譯錯誤。
\begin{lstlisting}[language=TeX]
\IfFileExists{Externals/ext.pdf}{
\includepdf[pagecommand={\thispagestyle{empty}}]{Externals/ext.pdf}
}{}
\end{lstlisting}

下方列出引入表格檔案的 tex 檔案,這個做法和加入 A.tex 到 chapter.tex 的行為相同。
\begin{lstlisting}[language=TeX]
\input{Tables/a.tex}
\end{lstlisting}

\subsection*{Reference 修改}

本專案的 reference 工具是 bib,下面將介紹 IEEE xplore 網站的文件取得論文的 bib 的格式。

如圖\ref{fig_bib_1},在該篇論文網站的左上角,點下 Cite This 會出現如圖\ref{fig_bib_2}的視窗,切換至 BibTex 分頁即複製這份論文的 bib 語法。
再將段文字貼上到 References/reference.bib 中即可。

\begin{figure}[H]
\centering
\includegraphics[width=0.5\textwidth]{./Figures/how_to_used/ieee_xplore_cite_this_bib_01.png}
\caption{cite this}
\label{fig_bib_1}
\end{figure}

\begin{figure}[H]
\centering
\includegraphics[width=0.5\textwidth]{./Figures/how_to_used/ieee_xplore_cite_this_bib_02.png}
\caption{bibtex text}
\label{fig_bib_2}
\end{figure}
35 changes: 35 additions & 0 deletions Chapters/introduction.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

\chapter{緒論}\label{introduction}


\section{前言}\label{preface}

NKUST LaTeX 論文版型提供給本校研究生撰寫論文。當您使用這個專案,表示您已經進入碩士生涯的最後階段,祝福您也恭喜您即將完成碩士學業。我們希望這個專案能在論文撰寫的路上給您提供助力。

本專案所使用的工具皆為 open source 軟體,可放心地由網路上自由下載合法的免費使用,文件編譯工具皆採用 TUG(TEX Users Group) 提供的 TexLive 套件包,編輯器使用 Microsoft 的 VSCode,並以 GNU Bash 環境作為開發的基礎。

目前當前我們正在測試讓這個版型可以運作於 Windows 系列的作業系統上,預計在 release v2.1 版本開始提供 Windows 上的支援。

\newpage

\section{研究動機}\label{motive}

那年的春天,我們從已經畢業的學長得知,過去的板型有一部份已經不符合學校新的規範,因此我們開始了板型重新編排的計劃。起初只是實驗室間共同開發,後來陸續有更多同學在 GitHub 上提交貢獻,也許多使用者也提供我們許多實用的建議,讓這個專案架構越來越完整,也讓整個環境往更簡便的方向前進。目前專案已經由學弟們維護,期望未來能夠幫助更多需要使用LaTeX撰寫論文的研究生。


\newpage

\section{論文架構}\label{thesis_arch}
\n 本論文編排方式如下:

\ref{ch_tmp_config}章 版型設定

\ref{ch_how2start}章 使用指南

\ref{ch_content}章 $LaTeX$ 文字範例

\ref{algorithm}章 演算法虛擬碼範例

\ref{Experimental_picture}章 模擬實驗與結果分析

\ref{conclusion_and_future}章 結論
18 changes: 14 additions & 4 deletions Chapters/chapter2.tex → Chapters/latex_example.tex
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
\chapter{內文} \label{ch_content}
\chapter{文字範例} \label{ch_content}
參考資料:\cite{latex_basic}, \cite{latex_fbox}

本專案中文字體採用 xeCJK 套件,字體套件設定請至 Configurtaions/template.tex 進行修改。
專案中中文字體預載的套件是教育部發布的 eduKai,英文字體預載的套件是 DejaVuSerif。
Path 是字體檔案的所在目錄,大括號中填入字體檔案名稱。
\begin{lstlisting}[language=TeX]
\setCJKmainfont[Path=./Fonts/]{edukai-4.0}
\setmainfont[Path=./Fonts/]{DejaVuSerif}
\end{lstlisting}

\section{字體}
\subsection{類型}
文字特效, Hello world! \\
\subsection{文字特效}
中文文字特效, Hello world!\\
{\LARGE
\textbf{Hello world!, bold face, 粗體} \\
\textit{Hello world!, italic, 斜體} \\
Expand Down Expand Up @@ -32,7 +41,7 @@ \subsection{類型}
in science
were made by accident.}

\subsection{大小}
\subsection{文字大小}
文字大小範例, Font Size.\\
{\tiny 文字大小範例, Font Size.}\\
{\scriptsize 文字大小範例, Font Size.}\\
Expand All @@ -45,6 +54,7 @@ \subsection{大小}
{\huge 文字大小範例, Font Size.} \\
{\Huge 文字大小範例, Font Size.}

\newpage

\section{列表} \label{sec_item}

Expand Down
117 changes: 117 additions & 0 deletions Chapters/template_config.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
\chapter{版型設定} \label{ch_tmp_config}

本章包含論文資訊、論文Logo、封面、相關文件引入以及版型微調等。
用於此版型的 config.tex 以及 Configurations 中的 tex 檔案。

\section{論文資訊}

論文資訊主要和論文作者、指導教授、學校等不變的訊息,其設定位於 config.tex 中。
設定中如有碰到 zhtw、tw 或 en 表示這個項目有區分中英文的。

\begin{lstlisting}[language=TeX]
\def\authortwname{王小明}
\def\authorenname{Shio-Min Wang}
\end{lstlisting}

目前規範中有一個項目需特別注意,因本校是由三所科技大學合併而成,因此論文需加入原本所屬學校的英文名稱。
下方為原校英文名稱的欄位,請依原校英文名進行修改。

\begin{lstlisting}[language=TeX]
\def\schoolenoldname{National Kaohsiung University of Applied Sciences}
\end{lstlisting}

\section{初稿與正式版}

給予口試委員的論文為初稿。因此需要封面加入初稿字樣,可透過 config.tex 進行設定。
當設定為 ture 時會產生初稿字樣,設定為 false 表示為正式版初稿字樣將會被隱藏。

\begin{lstlisting}[language=TeX]
\setboolean{thesisdraft}{true}
\setboolean{thesisdraft}{false}
\end{lstlisting}

\section{外部檔案匯入與啟用設定}

論文中的封面、書名頁皆可透過 LaTeX 產生,當您已經額外製作封面與書名頁時,可透過外部匯入的方式來取代。
另外博碩士論文授權書、論文口試委員會審定書、論文口試委員會英文審定書、博士論文推薦書皆由外部匯入,論文內無法自動產生。

\subsection*{封面}

封面要使用外部檔案時請將參數 isthesistitleexternal 設定為 true,
並將 externalmaintitle 參數導向至您放置 pdf 檔案的位置。

\begin{lstlisting}[language=TeX]
\setboolean{isthesistitleexternal}{false}
\def\externalmaintitle{Externals/maintitle}
\end{lstlisting}

\subsection*{書名頁}
書名頁與封面相同,預設為使用 LaTeX 產生,如需使用外部匯入,請修改 isthesisbooknameexternal 為 true,
並將 externalbooktitle 參數導向至您放置 pdf 檔案的位置。

\begin{lstlisting}[language=TeX]
\setboolean{isthesisbooknameexternal}{false}
\def\externalbooktitle{Externals/booktitle}
\end{lstlisting}

\subsection*{授權書與審定書}

授權書、審定書以及英文審定書皆由國家圖書館與學校提供,LaTeX 不提供此版型,因此需額外匯入,
請在匯入時注意修改的規範。載入請設定為 true,不載入請設定為 false。並依照該欄位說明填入指定的 pdf 檔案路徑。

碩博士論文授權書,由國家圖書館發布,依照規定正本應繳回圖書館,
此文件是否需放入論文中尚無定論,端看老師與系辦是否要求,
如需插入本頁文件,應當由您列印文件後簽署,再將簽署好的文件掃描插入此頁中。
\begin{lstlisting}[language=TeX]
\def\thesispowerofattorney{Externals/powerofattorney.pdf}
\setboolean{thesisauht}{false}
\end{lstlisting}

當您的論文口試委員審定書使用正本則請忽略此頁,如使用掃描檔案插入則請開啟此頁。
審定書有分中英文,故此將二個項目分開。此文件請由 https://acad.nkust.edu.tw/p/412-1004-2503.php?Lang=zh-tw 進行下載,
下載前建議您先確認本年度是否依然使用此份文件。

\begin{lstlisting}[language=TeX]
\def\thesisvalidationzhtw{Externals/sign.pdf}
\setboolean{thesissign_zhtw}{true}
\def\thesisvalidationen{Externals/sign_en.pdf}
\setboolean{thesissign_en}{true}
\end{lstlisting}

\subsection*{博士論文推薦書}
碩士不需要使用博士論文推薦書,此項目操作手法與審定書等相同。
\begin{lstlisting}[language=TeX]
\def\thesisphdrecommand{Externals/recommand.pdf}
\setboolean{thesisphdrecommand}{false}
\end{lstlisting}

\section{LaTeX 文件啟用與關閉}

\subsection*{誌謝與序言}

誌謝與序言在本專案中被視為相同的文件,載入該文件使用將 thesisacknowledgement 參數設為 true,反之則設為 false。
如您需要修改內容,請由 Instance/acknowledgement.tex 進行編輯。

\begin{lstlisting}[language=TeX]
\setboolean{thesisacknowledgement}{true}
\end{lstlisting}

\subsection*{目錄列表}

論文中包含了 3 種目錄,文件目錄、圖目錄、表目錄,當您論文沒有使用到圖片或表格時,將會產生多餘的頁數,
因此提供使用者手動屏蔽該頁的功能,載入目錄使用 ture,屏蔽目錄則使用 false。

\begin{lstlisting}[language=TeX]
\setboolean{thesiscontent}{true}
\setboolean{thesistable}{true}
\setboolean{thesisfiguretable}{true}
\end{lstlisting}

\subsection*{附錄}

附錄是論文的附加文件,在本專案的 3 個實驗室中,皆無附加附錄的功能。
因此此欄位預設為關閉狀態,如需啟用請自行在 Configurations/appendice.tex 中加入該附錄內容,如何修改此內容將於下一章節進行說明。

\begin{lstlisting}[language=TeX]
\setboolean{thesisappendix}{false}
\end{lstlisting}
8 changes: 5 additions & 3 deletions Configurations/chapter.tex
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
\mainmatter % Begin numeric (1,2,3...) page numbering

% ----- Chapter ----
\input{Chapters/chapter1.tex}
\input{Chapters/chapter2.tex}
\input{Chapters/introduction.tex}
\input{Chapters/template_config.tex}
\input{Chapters/how_to_start.tex}
\input{Chapters/latex_example.tex}
\input{Chapters/algorithm.tex}
\input{Chapters/experimental_results.tex}
\input{Chapters/experimental_picture.tex}
\input{Chapters/conclusion.tex}
% ------------------

Loading

0 comments on commit b2590a3

Please sign in to comment.