Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Created by https://www.gitignore.io/api/macos
# Edit at https://www.gitignore.io/?templates=macos

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# End of https://www.gitignore.io/api/macos
Binary file added FJU_patch.pdf
Binary file not shown.
127 changes: 127 additions & 0 deletions FJU_patch/FJU_thesis.cls
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
% This class is a link to real class.
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{FJU_thesis}[2019/12/15 by Retso]
% pass no defined option to book class.
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{thesis_base}}
% terminates the option processing.
\ProcessOptions\relax

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Load base class
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\LoadClass{thesis_base}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Redefine header of abstract
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage[page,xspace]{totalcount}
\def\mcShift{\hspace{-6.0pt}} % It's for align non-multicolumn cell .
\def\abstractHeaderZh{\centering
\abstractHeaderStyle
\normalsize
{ \renewcommand{\arraystretch}{1}
\begin{tabularx}{\textwidth}{l@{\hspace*{0.4em}}lXl@{\hspace*{0.4em}}l}

\multicolumn{3}{l}{\textbf{論文名稱:{\titleZh}}} \\
& & \\
\textbf{校(院)所組別:{\collegeZh}{\deptZh}} & \multicolumn{2}{r}{\textbf{總頁數:{\totalpages}}} \\
\textbf{畢業時間:{\degreedAcademic}} & & \\
\textbf{研究生:{\authorZh}} & \textbf{指導教授:{\profsZh}} &

\end{tabularx}\par }
}

\def\abstractHeaderEn{\centering
\abstractHeaderStyle
\normalsize
\textbf{\titleEn}
{ \renewcommand{\arraystretch}{1}
\begin{tabularx}{\textwidth}{l@{\hspace*{0.4em}}XXl@{\hspace*{0.4em}}l}
\textbf{Student:{\authorEn}} & & \textbf{Advisor:{\profsEn}} \\
\end{tabularx}\par }
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Redefine Chapter Title
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\@makechapterhead#1{%
\ifzh{
\vspace*{-1.3cm}{}
% zh
{
% Abstract Header
\ifthenelse{\equal{#1}{摘要}}{
{\abstractHeaderZh\par}
}{
\ifthenelse{\equal{#1}{Abstract}}{
{\abstractHeaderEn\par}
}{}
}

% Chapter Title
% The zh abstract title shouldn't be centering
\ifthenelse{\equal{#1}{摘要}}{
\normalfont \noindent #1\par
}{
{
\parindent \z@ \centering \normalfont % modify by sppmg
% The en abstract title should be base font
\ifthenelse{\equal{#1}{Abstract}}{
#1\par\nobreak
}{
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\chapterTitleStyle \zhnumber{\thechapter}、\makebox[0.5em]{} % modify by sppmg
\fi
\fi
\chapterTitleStyle #1\par\nobreak % modify by sppmg
\vskip 40\p@
}
}
}
}
}{
% en
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\chapterTitleNumStyle \@chapapp\space \thechapter % modify by sppmg
\par\nobreak
\vskip 20\p@
\fi
\fi
\interlinepenalty\@M
\chapterTitleStyle #1\par\nobreak % modify by sppmg
\vskip 40\p@
}
}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Redefine TOC/LOF/LOT Title
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\@makeschapterhead#1{%
{
\ifzh{
% Chinese
\parindent \z@ \centering % modify by sppmg
}{
% English
\parindent \z@ \raggedright
}
\normalfont
\interlinepenalty\@M
\chapterTitleStyle #1\par\nobreak
\vskip 40\p@
}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Redefine other configure
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\geometry{includefoot, top=3cm, bottom=3cm, inner=3cm, outer=3cm}

\endinput % this must be the last command.
22 changes: 22 additions & 0 deletions FJU_patch/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 天主教輔仁大學 LaTeX 論文樣板(patch)

為了維護方便,輔大版的僅附上與中央版有差異的檔案。請透過內附的 [build](https://github.com/sppmg/TW_Thesis_Template/wiki/%E7%84%A1%E8%85%A6%E6%89%8B%E5%86%8A#patch-%E7%89%88%E5%BB%BA%E7%AB%8B%E6%96%B9%E6%B3%95) 工具建立完整樣板。

此樣板依照[輔仁大學學位論文印製格式統一規定](http://docs.academic.fju.edu.tw/edulaw/學位論文印製格式統一規定.pdf),並針對中文語系製作且已通過圖書館審核,如果語系是英文的話還需要做些微調(希望你也可以把微調的東西傳上來造福學弟、妹們)。

## 使用方法
見本專案的 [Wiki](https://github.com/sppmg/TW_Thesis_Template/wiki) 。

或是你想從[無腦手冊](https://github.com/sppmg/TW_Thesis_Template/wiki/%E7%84%A1%E8%85%A6%E6%89%8B%E5%86%8A)開始。

## 論文相關說明

### 書脊
我相信學校附近的影印店比我專業的多 :D ,而且我不知道你做了書脊他們會如何使用。

如果仍然希望自製書脊者,請參考台大版(NTU_patch)的製作方式。

### 浮水印

已附上浮水印。此浮水印是由[此處下載](http://web.lib.fju.edu.tw/chi/sites/default/files/image/watermark.jpg)

9 changes: 9 additions & 0 deletions FJU_patch/abstract_zh.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
\documentclass[class=FJU_thesis, crop=false]{standalone}
\begin{document}

\chapter{摘要}
在此寫上你的中文摘要。

\vspace{2em}
\noindent 關鍵字: \keywordsZh{} % Set keywords in config.tex
\end{document}
41 changes: 41 additions & 0 deletions FJU_patch/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/sh
# windows use busybox.exe sh build.sh

# University abbreviation from directory name NCU_...
university=$(basename "$(pwd)" | cut -f 1 -d "_")

echo "I will build a integrated template for ${university}, which language you want?"
read -p "zh / en > " lang

if [ ! $lang = "zh" ] && [ ! $lang = "en" ] ; then
echo ERROR: Your input is \"$lang\", but only \"zh\" or \"en\" is valid !
exit 1
fi
if [ ! -d "../NCU_$lang" ] ; then
ERROR: Can\'t find directory \"NCU$lang\"
exit 1
fi
echo "OK, building $lang version"

cp -r ../NCU_$lang ../${university}_$lang
cp -r ./* ../${university}_$lang
cd ../${university}_$lang

# change class name in every file
sed -i '/^\\documentclass/ s/NCU_thesis/'${university}'_thesis/g' $(find -name "*.tex" -type f )

if [ "$lang" = "en" ] ; then
# remove NCU only files.
rm titlepage_en.tex titlepage_zh.tex zh_hidden_warning.tex

sed -i '/lang/ s/zh/en/' config.tex
# Disable Chinese for en avoid no Chinese font
sed -i '/disableChinese/ s/false/true/' config.tex
echo "Default disable Chinese for English template avoid no Chinese font, change setting in config.tex if you need Chinese."
#sed -i '/baseFontSize/ s/14/12/' config.tex
#sed -i '/baseLineStretch/ s/1.3/2/' config.tex
sed -i '/\\printbibliography/ s/title = .*,//' bibliography.tex
fi

rm build.sh build.bat
echo "Finish ! Enjoy ${university}_$lang LaTeX template by sppmg :D"
Loading