Fulfill requirements of the administration office.
Seperate contents from its format.
Available on different OS.
Optional
Easy to use and to modify.
Structure
Thus, a thesis template can be divided into two parts, formats and content, configurations about format should be extracted into options selected in the document, or not even shown in document, therefore, format configurations go to .cls, .bst and others.
To make project more clean, content have many types, texts, codes, figures, biblography database and others. A thesis project structure can be described as:
The contet of thesis has two type: variable and invariable, invariable content like some words in cover, headings, declarations and so on, conventional or bad template cannot extract these out of format, it’s not good.
The content of mani.tex can be described as:
1 2 3 4 5 6 7 8 9
|- options of document class |- variables |- content | |- cover | |- abstract | |- table of contents | |- body | |- reference | |- ...
Each content except body should be put in an isolated file, in or not in a environment:
\ExplSyntaxOn % create a sequence to save members \seq_new:N\g_defense_committee_seq \seq_clear:N\g_defense_committee_seq \NewDocumentCommand\addcommitteemember {m}{ \seq_set_split:Nnn\l_tmpa_seq {,} {#1} \clist_set_from_seq:NN\l_tmpb_clist\l_tmpa_seq \seq_gput_right:Nx\g_defense_committee_seq\l_tmpb_clist }
\tl_set:Nn\g_dc_tabular_tl {\sanhao}
% commands to set width and height of a box \box_new:N\l_bp_set_to_box \cs_new_protected:Npn\bp_box_set_to:NNn#1#2#3 { \hbox_set:Nn\l_bp_set_to_box {#3} \dim_set:Nn#2 { #1\l_bp_set_to_box } \box_set_eq:NN\l_bp_set_to_box\c_empty_box } \cs_new_protected:Npn\bp_set_to_height:Nn { \bp_box_set_to:NNn\box_ht:N } \cs_new_protected:Npn\bp_set_to_depth:Nn { \bp_box_set_to:NNn\box_dp:N } \cs_new_protected:Npn\bp_set_to_width:Nn { \bp_box_set_to:NNn\box_wd:N } \cs_new:Npn\WidthOfSpace { \tex_fontdimen:D 2 \tex_font:D }
% generate token list of committe list \NewDocumentCommand\gencommitteelist {}{ \fp_new:N\l_moriambar_ratio_fp \seq_gpop_left:NN\g_defense_committee_seq\l_dcc_tl