diff --git a/njuthesis.dtx b/njuthesis.dtx index 474285b8a3b2a76f010d6bf9508ae928410244c2..479a398747a18e2fcee83a25dc9b57e36e975f1f 100644 --- a/njuthesis.dtx +++ b/njuthesis.dtx @@ -207,7 +207,7 @@ through XeTeX. % %<class>\NeedsTeXFormat{LaTeX2e} %<class>\RequirePackage{expl3} -%<!(readme-zh|readme-en)> \GetIdInfo $Id: njuthesis.dtx 0.9.0 2020-09-15 12:00:00 +0800 NJU LUG <my@yaoge123.com> $ +%<!(readme-zh|readme-en)> \GetIdInfo $Id: njuthesis.dtx 0.9.0 2021-09-15 12:00:00 +0800 NJU LUG <my@yaoge123.com> $ %<class> {Thesis template for Nanjing University} %<class>\ProvidesExplClass{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} % @@ -220,18 +220,24 @@ through XeTeX. %</driver> % \fi % -% \title{The \pkg{njuthesis} package\\ 鍗椾含澶у瀛︿綅璁烘枃妯℃澘} +% \title{The \textsc{NJuThesis} class\\ 鍗椾含澶у瀛︿綅璁烘枃妯℃澘} % % \author{^^A % Nanjing University Linux User Group\thanks{E-mail: \href{mailto:my@yaoge123.com}{my@yaoge123.com}}} % -% \date{Released 2021-09-13} +% \date{v0.9.0 \\ Released 2021-09-15} % % \maketitle % % \begin{abstract} % 鍗椾含澶у瀛︿綅璁烘枃\hologo{LaTeX}妯℃澘鍩轰簬鏈鐢熼櫌鐨勮鏂囨挵鍐欒鑼冨埗浣滐紝鍚屾椂鍙傝€冪爺绌剁敓闄㈡彁渚涚殑纭曞+銆佸崥澹浣嶆潗鏂欏寘锛岀敤浜庣敓鎴愮鍚堝崡浜ぇ瀛﹀浣嶈鏂囨帓鐗堣姹傚拰鐩稿簲鐨勫浗瀹惰鑼冦€佽涓氭爣鍑嗙殑瀛︿綅璁烘枃锛屾棬鍦ㄤ负鍚屽鎻愪緵姣曚笟璁烘枃涔﹀啓鐨勬柟渚裤€� % \end{abstract} +% +% \def\abstractname{鐗瑰埆澹版槑} +% \begin{abstract} +% 璇锋敞鎰忥紝鏈ā鏉夸粛鏈畬鎴愬紑鍙戯紝鍑虹幇bug鎴栬€呮枃妗d笉瀹屽杽灞炰簬姝e父鎯呭喌锛屾彁issue鍗冲彲銆� +% \end{abstract} +% % \clearpage % % \tableofcontents @@ -272,7 +278,7 @@ through XeTeX. % \end{tabular} % \end{table} % -% \section{鏈湴缂栬瘧} +% \subsection{鏈湴缂栬瘧} % % \subsubsection{瀹夎\hologo{TeX}鍙戣鐗坿 % @@ -326,17 +332,14 @@ through XeTeX. % % 鐢变簬\href{https://www.overleaf.com/}{Overleaf骞冲彴}鐨刓hologo{TeX}\,Live鐗堟湰鍋滅暀鍦�2020锛孿texttt{cleveref}鍖呭湪寮曠敤绔犺妭鏃朵細鐢熸垚閿欒鐨勬爣绛撅紝寮曞彂鏍煎紡閿欒锛涜€屽崡澶hologo{TeX}閫氳繃鍙婃椂鏇存柊瑙勯伩浜嗚繖涓€闂銆傚洜姝emph{璇峰姟蹇呬笉瑕佷娇鐢∣verleaf瀹樼綉杩涜缂栬瘧}銆� % -% \subsection{瀛椾綋} -% -% 瀛︽牎璁烘枃鏍煎紡瑕佹眰浣跨敤鐨勫瓧浣撲竴鑸凡缁忛瑁呭湪鍚勪釜鎿嶄綔绯荤粺锛屾湰妯℃澘閽堝涓嶅悓骞冲彴杩涜浜嗚嚜鍔ㄦ娴嬮€傞厤锛屽彲浠ュ紑绠卞嵆鐢ㄣ€� -% -% 鍚勪釜绯荤粺鐨勯粯璁ゅ瓧浣撹鍙傝€儃tab:defaultfontset}銆傚彲浠ョ湅鍒帮紝涓嶅悓绯荤粺涓婁娇鐢ㄧ殑瀛椾綋鏈夋墍宸埆锛屽疄闄呰緭鍑虹粨鏋滃彲鑳藉瓨鍦ㄧ粏寰笉鍚�, 浣跨敤鏃惰娉ㄦ剰銆備緥濡傦紝鍦↙inux骞冲彴鎴栬€呬娇鐢ㄤ簡Ubuntu鍚庣鐨勫崡澶hologo{TeX}涓婏紝瀹嬩綋鍔犵矖鏁堟灉鏇存槑鏄撅紱鍙︿竴鏂归潰锛屽湪Windows骞冲彴杩涜缂栬瘧鐨勬晥鏋滄洿鎺ヨ繎Word鍔犵矖\footnote{鍥犱负SimSun娌℃湁鍘熺敓绮椾綋锛岄€氳繃AutoFakeBold=2.17杩涜妯′豢}銆� % % % \section{浣跨敤鏂规硶} % % \subsection{鑷畾涔夐€夐」} % +% 鍔犵矖鐨勪负榛樿閫夐」 +% % \begin{function}[added=2021-09-07]{titlelength} % \begin{syntax} % titlelength = <(1)|2|3> @@ -367,7 +370,7 @@ through XeTeX. % \subsubsection{瀛︿綅淇℃伅} % \begin{function}[added=2021-09-07]{degree} % \begin{syntax} -% degree = <mg|mf|phd|(ug)> +% degree = <(ug)|mg|mf|phd> % \end{syntax} % % 閫夋嫨瀛︿綅锛屽彲閫夛細 @@ -377,7 +380,7 @@ through XeTeX. % % \begin{function}[added=2021-09-07]{type} % \begin{syntax} -% type = <design|(thesis)> +% type = <(thesis)|design> % \end{syntax} % % 鐢ㄤ簬閫夋嫨鏂囨。绫诲瀷骞跺皢鐩稿叧瀛楁杈撳嚭鍦ㄥ皝闈㈠拰鎽樿椤点€傚彲閫夊€煎寘鎷瑃hesis锛堣〃绀烘瘯涓氳鏂囷級鍜宒esign锛堣〃绀烘瘯涓氳璁★級锛岀己鐪佸€间负thesis銆� @@ -393,13 +396,15 @@ through XeTeX. % systemfont = <\TFF> % \end{syntax} % -% 鏄惁浣跨敤绯荤粺棰勮鐨勫瓧浣擄紝鍙€夛細 -% \opt{true}锛堥粯璁わ級锛孿opt{false}銆� +% 瀛︽牎璁烘枃鏍煎紡瑕佹眰浣跨敤鐨勫瓧浣撲竴鑸凡缁忛瑁呭湪鍚勪釜鎿嶄綔绯荤粺锛屾湰妯℃澘閽堝涓嶅悓骞冲彴杩涜浜嗚嚜鍔ㄦ娴嬮€傞厤锛屽彲浠ュ紑绠卞嵆鐢ㄣ€� +% +% 濡傛灉甯屾湜鏇存敼鏈ā鏉夸娇鐢ㄧ殑瀛椾綋锛岃灏嗘湰閫夐」璁剧疆涓篭opt{false}锛岀劧鍚庝娇鐢ㄤ互涓嬩袱涓€夐」鍗曠嫭璁剧疆瑗挎枃鍜屼腑鏂囧瓧浣撱€� +% % \end{function} % % \begin{function}[added=2021-09-07]{customlatinfont} % \begin{syntax} -% customlatinfont = <null|macos|gyre|(windows)> +% customlatinfont = <(windows)|macos|gyre|null> % \end{syntax} % % 鎵嬪姩鎸囧畾鑻辨枃瀛椾綋锛屽彲閫夛細 @@ -409,11 +414,20 @@ through XeTeX. % % \begin{function}[added=2021-09-07]{customchinesefont} % \begin{syntax} -% customchinesefont = <null|macos|fandol|founder|noto|(windows)> +% customchinesefont = <(windows)|macos|fandol|founder|noto|null> % \end{syntax} % % 鎵嬪姩鎸囧畾涓枃瀛椾綋锛屽彲閫夛細 % \opt{windows}锛堥粯璁わ級锛� \opt{macos}锛� \opt{fandol}锛� \opt{founder}锛孿opt{noto}锛孿opt{null}銆� +% +% FZSSK 鏂规涔﹀畫锛堢畝绻佹墿灞曪級 http://www.foundertype.com/index.php/FontInfo/index/id/151 鍏嶈垂鍟嗙敤 +% +% FZXBSK 鏂规灏忔爣瀹嬶紙绠€绻佹墿灞曪級 http://www.foundertype.com/index.php/FontInfo/index/id/164 璁捐甯堥潪鍟嗗厤璐� +% +% FZKTK 鏂规妤蜂綋锛堢畝绻佹墿灞曪級 http://www.foundertype.com/index.php/FontInfo/index/id/137 鍏嶈垂鍟嗙敤 +% +% 鍚勪釜绯荤粺鐨勯粯璁ゅ瓧浣撹鍙傝€冦€傚彲浠ョ湅鍒帮紝涓嶅悓绯荤粺涓婁娇鐢ㄧ殑瀛椾綋鏈夋墍宸埆锛屽疄闄呰緭鍑虹粨鏋滃彲鑳藉瓨鍦ㄧ粏寰笉鍚�, 浣跨敤鏃惰娉ㄦ剰銆備緥濡傦紝鍦↙inux骞冲彴鎴栬€呬娇鐢ㄤ簡Ubuntu鍚庣鐨勫崡澶hologo{TeX}涓婏紝瀹嬩綋鍔犵矖鏁堟灉鏇存槑鏄撅紱鍙︿竴鏂归潰锛屽湪Windows骞冲彴杩涜缂栬瘧鐨勬晥鏋滄洿鎺ヨ繎Word鍔犵矖\footnote{鍥犱负SimSun娌℃湁鍘熺敓绮椾綋锛岄€氳繃AutoFakeBold=2.17杩涜妯′豢}锛岀鍚堣瑙変範鎯€� +% % \end{function} % % @@ -521,8 +535,9 @@ through XeTeX. % % \begin{implementation} % -% \section{\pkg{njuthesis} 浠g爜瀹炵幇} +% \section{浠g爜瀹炵幇} % +% laTex榛樿1.2琛岃窛锛寃ord榛樿琛岃窛鏄�1.3锛岃姹�1.5鍊峸ord琛岃窛锛屾晠1.5/1.2*1.3 = 1.625 % \begin{macrocode} %<*class> \LoadClass[ @@ -530,7 +545,7 @@ through XeTeX. twoside, UTF8, scheme=chinese, - linespread=1.625,% laTex榛樿1.2琛岃窛锛寃ord榛樿琛岃窛鏄�1.3锛岃姹�1.5鍊峸ord琛岃窛锛屾晠1.5/1.2*1.3 = 1.625 + linespread=1.625, fontset=none, zihao=-4 ]{ctexbook}[2018/04/01] @@ -733,7 +748,13 @@ through XeTeX. % 鐢ㄤ簬鐢熸垚鍙互琚彃鍏ヤ功绛剧殑LaTeX logo锛孴ODO 浣跨敤hologo鍒涘缓|latex{}|鍛戒护 % \begin{macrocode} \RequirePackage{hologo} -% \RequirePackage{needspace} % Required to prevent page break right after a sectioning command +% \end{macrocode} +% +% Put text here. +% \begin{macrocode} +% Required to prevent page break right after a sectioning command +% \RequirePackage{needspace} + % \RequirePackage{xspace} % Better print trailing whitespace % \end{macrocode} % @@ -859,14 +880,16 @@ through XeTeX. \setCJKfamilyfont{zhhei}{SimHei} \setCJKfamilyfont{zhfs}{FangSong} \setCJKfamilyfont{zhkai}{KaiTi}[AutoFakeBold=2.17] - \setCJKfamilyfont{zhnewhei}{Microsoft~YaHei}[BoldFont=Microsoft~YaHei~Bold] + \setCJKfamilyfont{zhnewhei}{Microsoft~YaHei}[ + BoldFont=Microsoft~YaHei~Bold] } % \end{macrocode} % % Put text here. % \begin{macrocode} \NewDocumentCommand\set_chinese_fontset_macos{}{ - \msg_redirect_name:nnn {fontspec} {no-script} {info} % 绉婚櫎 does not contain script "CJK" 璀﹀憡 + % 绉婚櫎 does not contain script "CJK" 璀﹀憡 + \msg_redirect_name:nnn {fontspec} {no-script} {info} \setCJKmainfont{Songti~SC~Light}[ BoldFont=Songti~SC~Bold, ItalicFont=Kaiti~SC, @@ -894,7 +917,8 @@ through XeTeX. % Put text here. % \begin{macrocode} \NewDocumentCommand\set_chinese_fontset_fandol{}{ - \msg_redirect_name:nnn {fontspec} {no-script} {info} % 绉婚櫎 does not contain script "CJK" 璀﹀憡 + % 绉婚櫎 does not contain script "CJK" 璀﹀憡 + \msg_redirect_name:nnn {fontspec} {no-script} {info} \setCJKmainfont{FandolSong-Regular}[ Extension=.otf, BoldFont=FandolSong-Bold, @@ -920,9 +944,6 @@ through XeTeX. % \begin{macrocode} % 鏂规瀛楃闆� \NewDocumentCommand\set_chinese_fontset_founder{}{ - % FZSSK 鏂规涔﹀畫锛堢畝绻佹墿灞曪級 http://www.foundertype.com/index.php/FontInfo/index/id/151 鍏嶈垂鍟嗙敤 - % FZXBSK 鏂规灏忔爣瀹嬶紙绠€绻佹墿灞曪級 http://www.foundertype.com/index.php/FontInfo/index/id/164 璁捐甯堥潪鍟嗗厤璐� - % FZKTK 鏂规妤蜂綋锛堢畝绻佹墿灞曪級 http://www.foundertype.com/index.php/FontInfo/index/id/137 鍏嶈垂鍟嗙敤 \setCJKmainfont{FZSSK}[ Extension=.ttf, BoldFont=FZXBSK, @@ -1765,7 +1786,10 @@ through XeTeX. \cleardoublepage } } - +% \end{macrocode} +% +% Put text here. +% \begin{macrocode} % 鏈灏侀潰 \tl_set:Nn \nju_printcover_ug { @@ -1796,7 +1820,10 @@ through XeTeX. % \vfill % \newpage } - +% \end{macrocode} +% +% Put text here. +% \begin{macrocode} % 鐮旂┒鐢熷皝闈� \tl_set:Nn \nju_printcover_g { @@ -1848,7 +1875,10 @@ through XeTeX. \end{spacing} \cleardoublepage } - +% \end{macrocode} +% +% Put text here. +% \begin{macrocode} % 閲嶅畾涔塵aketitle鐢熸垚灏侀潰 \tl_set:Nn \maketitle {% @@ -1864,7 +1894,8 @@ through XeTeX. } % \end{macrocode} % -% Put text here. +% \subsection{鎽樿缁樺埗} +% % \begin{macrocode} % 鍒ゆ柇瀛︿綅 \str_if_eq:NNTF {\nju_degree} { ug } @@ -1877,7 +1908,8 @@ through XeTeX. % \phantomsection\addcontentsline{toc}{chapter}{涓枃鎽樿} % 灏嗘憳瑕佹彃鍏ョ洰褰曞拰pdf涔︾ \pdfbookmark[0]{涓枃鎽樿}{涓枃鎽樿} % 灏嗘憳瑕佹彃鍏df涔︾锛屼笌涓婁竴琛屼笉鍙叡瀛� \begin{center} - \kaishu\zihao{-2}{\textbf{\uuline{鍗椾含澶у鏈鐢熸瘯涓氳鏂囷紙璁捐銆佷綔鍝侊級涓枃鎽樿}}} + \kaishu\zihao{-2}{\textbf{\uuline{ + 鍗椾含澶у鏈鐢熸瘯涓氳鏂囷紙璁捐銆佷綔鍝侊級涓枃鎽樿}}} \end{center} {\bgroup \kaishu\zihao{-4} @@ -1910,7 +1942,8 @@ through XeTeX. % \phantomsection\addcontentsline{toc}{chapter}{鑻辨枃鎽樿} % 灏嗘憳瑕佹彃鍏ョ洰褰曞拰pdf涔︾ \pdfbookmark[0]{鑻辨枃鎽樿}{鑻辨枃鎽樿} % 灏嗘憳瑕佹彃鍏df涔︾锛屼笌涓婁竴琛屼笉鍙叡瀛� \begin{center} - \kaishu\zihao{-2}{\textbf{\uuline{鍗椾含澶у鏈鐢熸瘯涓氳鏂囷紙璁捐銆佷綔鍝侊級鑻辨枃鎽樿}}} + \kaishu\zihao{-2}{\textbf{\uuline{ + 鍗椾含澶у鏈鐢熸瘯涓氳鏂囷紙璁捐銆佷綔鍝侊級鑻辨枃鎽樿}}} \end{center} { \bgroup @@ -1934,6 +1967,10 @@ through XeTeX. {KEYWORDS{:}}~~{#1}% } } +% \end{macrocode} +% +% Put text here. +% \begin{macrocode} { % 鐮旂┒鐢熸憳瑕佺幆澧� \NewDocumentEnvironment{abstract} {} @@ -1943,7 +1980,8 @@ through XeTeX. % \phantomsection\addcontentsline{toc}{chapter}{涓枃鎽樿} % 灏嗘憳瑕佹彃鍏ョ洰褰曞拰pdf涔︾ \pdfbookmark[0]{涓枃鎽樿}{涓枃鎽樿} % 灏嗘憳瑕佹彃鍏df涔︾锛屼笌涓婁竴琛屼笉鍙叡瀛� \begin{center} - \kaishu\zihao{-2}{\textbf{\uuline{鍗椾含澶у鐮旂┒鐢熸瘯涓氳鏂囦腑鏂囨憳瑕侀椤电敤绾竲}} + \kaishu\zihao{-2}{\textbf{\uuline{ + 鍗椾含澶у鐮旂┒鐢熸瘯涓氳鏂囦腑鏂囨憳瑕侀椤电敤绾竲}} \end{center} \bgroup @@ -1976,7 +2014,8 @@ through XeTeX. % \phantomsection\addcontentsline{toc}{chapter}{鑻辨枃鎽樿} % 灏嗘憳瑕佹彃鍏ョ洰褰曞拰pdf涔︾ \pdfbookmark[0]{鑻辨枃鎽樿}{鑻辨枃鎽樿} % 灏嗘憳瑕佹彃鍏df涔︾锛屼笌涓婁竴琛屼笉鍙叡瀛� \begin{center} - \kaishu\zihao{-2}{\textbf{\uuline{鍗椾含澶у鐮旂┒鐢熸瘯涓氳鏂囪嫳鏂囨憳瑕侀椤电敤绾竲}} + \kaishu\zihao{-2}{\textbf{\uuline{ + 鍗椾含澶у鐮旂┒鐢熸瘯涓氳鏂囪嫳鏂囨憳瑕侀椤电敤绾竲}} \end{center} { \bgroup