From 1e419156c93a0ecfe3f31c8ab7134c687afb50b4 Mon Sep 17 00:00:00 2001 From: Yu Xiong <181850195@smail.nju.edu.cn> Date: Mon, 6 Dec 2021 16:41:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=AE=BE=E7=BD=AE=E5=8F=82=E8=80=83?= =?UTF-8?q?=E6=96=87=E7=8C=AE=E9=BB=98=E8=AE=A4=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 鍦ㄦā鏉夸腑杩涜鐩稿叧璁剧疆锛岀幇鍦ㄦ棤闇€鍦╘printbibliography鍚庝慨鏀瑰弬鏁般€� - 鏇存敼浜嗚鏄庢枃妗d腑浠g爜鍐呭鐨勫憟鐜版柟寮� - 淇敼璇存槑鏂囨。鐨勭浉鍏冲唴瀹� - 浠g爜缂╄繘鏍峰紡璋冩暣 --- source/njuthesis.dtx | 390 +++++++++++++++++++++++-------------------- 1 file changed, 207 insertions(+), 183 deletions(-) diff --git a/source/njuthesis.dtx b/source/njuthesis.dtx index 10d26ba..b0f1d91 100644 --- a/source/njuthesis.dtx +++ b/source/njuthesis.dtx @@ -113,7 +113,7 @@ through XeTeX. %<*driver> \ProvidesFile{njuthesis.dtx} \documentclass{ctxdoc} -\usepackage{floatrow,tabularray,njuvisual} +\usepackage{floatrow,listings,tabularray,njuvisual} \usepackage[firstpage=true]{background} \backgroundsetup{contents={\njuemblem[white!85!gray]{22cm}{!}},scale=1,angle=0,hshift=-4cm} \setlist[1]{labelindent=0.5em} @@ -121,6 +121,45 @@ through XeTeX. \DefTblrTemplate{caption-tag}{default}{琛╘hspace{0.25em}\thetable} \SetTblrStyle{caption-tag}{font=\bfseries} \DefTblrTemplate{caption-sep}{default}{\quad} +\lstdefinestyle{style@base} + { + basewidth = 0.5 em, + gobble = 3, + lineskip = 3 pt, + frame = l, + framerule = 1 pt, + framesep = 0 pt, + xleftmargin = 2 em, + xrightmargin = 3 em, + escapeinside = {(*}{*)}, + basicstyle = \small\ttfamily, + keywordstyle = \bfseries\color{njuviolet}, + commentstyle = \itshape\color{white!50!gray}, + stringstyle = \color{nju-chem-red}, + backgroundcolor = \color{white!95!gray} + } +\lstdefinestyle{style@shell} + { + style = style@base, + rulecolor = \color{njumagenta}, + language = bash, + alsoletter = {-}, + emphstyle = \color{green} + } +\lstdefinestyle{style@latex} + { + style = style@base, + rulecolor = \color{njublue}, + language = [LaTeX]TeX, + alsoletter = {*, -}, + texcsstyle = *\color{njuviolet}, + emphstyle = [1]\color{nju-ai-orange}, + emphstyle = [2]\color{nju-cs-green} + } +\lstnewenvironment{shellexample}[1][]{% + \lstset{style=style@shell, #1}}{} +\lstnewenvironment{latexexample}[1][]{% + \lstset{style=style@latex, #1}}{} \begin{document} \DocInput{njuthesis.dtx} \PrintChanges @@ -154,6 +193,7 @@ through XeTeX. % \changes{v0.12}{2021/11/28}{鍒犻櫎鍐呯疆鐨� \pkg{njuvisual} 浠g爜銆倉 % \changes{v0.12}{2021/11/29}{鏇存柊浜嗚鏄庢枃妗e皝闈㈣璁°€倉 % \changes{v0.12}{2021/11/30}{鍖哄垎娴嬭瘯鏂囦欢鍜岀┖鐧芥ā鏉裤€倉 +% \changes{v0.12}{2021/12/06}{淇敼浜嗚鏄庢枃妗g殑浠g爜鍛堢幇鏍峰紡銆倉 % % \maketitle % @@ -252,9 +292,9 @@ through XeTeX. % \ref{subsec:onlinecompile}銆� % 鎮ㄥ彲浠ラ€氳繃 \hologo{TeX}\,Live Manager 鎴栬€� \hologo{MiKTeX} Console 绛夊浘褰㈠寲鍖呯鐞嗗櫒 % 鐩存帴瀹夎骞朵娇鐢ㄤ互涓婁袱涓畯鍖呮渶鏂扮殑绋冲畾鐗堬紝涔熷彲浠ヤ娇鐢� \pkg{tlmgr} 鐨勭粓绔懡浠わ細 -% \begin{ctexexam} +% \begin{shellexample}[morekeywords={tlmgr,install}] % tlmgr install njuthesis njuvisual -% \end{ctexexam} +% \end{shellexample} % % 鎴戜滑\emph{寮虹儓寤鸿}浣跨敤杩欎竴绫诲畨瑁呮柟寮忋€� % @@ -380,22 +420,25 @@ through XeTeX. % 缂栬瘧鍛戒护鍏蜂綋涓哄紩鎿庡悕绉板姞鏂囦欢鍚嶏紝鍦ㄧ紪璇� \file{.tex} 鏂囦欢鏃讹紝鏂囦欢鎵╁睍鍚嶅彲浠ョ渷鐣ヤ笉鍐欍€� % 鐜伴樁娈� \cls{njuthesis} 浠呮敮鎸� \hologo{XeLaTeX} 涓� \hologo{LuaLaTeX}銆傝娉ㄦ剰锛屽嚑绉嶅懡浠ょ殑杈撳嚭鏂囦欢鍩烘湰鐩稿悓锛屽彲浠ヤ换鍙栦竴绉嶏紱浣嗗鏋滀綘涓嶆竻妤氳繖涓ょ缂栬瘧寮曟搸鐨勫尯鍒紝鎴戜滑寤鸿浼樺厛浣跨敤|latexmk -xelatex|銆� % -% \subparagraph{浣跨敤 \hologo{XeLaTeX}} +% \subparagraph{浣跨敤 \hologo{XeLaTeX}} +% 鏍囧噯鐨� \hologo{XeLaTeX} 寮曟搸缂栬瘧鏂规硶銆� % -% \begin{ctexexam} +% \begin{shellexample}[morekeywords={xelatex,biber}] % xelatex njuthesis-sample % biber njuthesis-sample % xelatex njuthesis-sample % xelatex njuthesis-sample -% \end{ctexexam} +% \end{shellexample} % % \subparagraph{浣跨敤 \hologo{LuaLaTeX}} -% \begin{ctexexam} +% 鏍囧噯鐨� \hologo{LuaLaTeX} 寮曟搸缂栬瘧鏂规硶銆� +% +% \begin{shellexample}[morekeywords={lualatex,biber}] % lualatex njuthesis-sample % biber njuthesis-sample % lualatex njuthesis-sample % lualatex njuthesis-sample -% \end{ctexexam} +% \end{shellexample} % % \subparagraph{浣跨敤 \pkg{latexmk}} % \href{https://mg.readthedocs.io/latexmk.html}{\pkg{latexmk}} 鏄竴涓熀浜� Perl 鑴氭湰鐨勮嚜鍔ㄧ紪璇戝伐鍏凤紝瀹楁棬鏄€氳繃鍗曚竴鍛戒护绠€鍖栦笂杩扮殑澶氭缂栬瘧娴佺▼銆傚湪浣跨敤璇ュ懡浠ゅ墠锛岃纭繚瀹夎浜嗕互涓嬭蒋浠讹細 @@ -405,19 +448,19 @@ through XeTeX. % \end{description} % % 璇ュ懡浠ょ殑浣跨敤鏂规硶涓� -% \begin{ctexexam} +% \begin{shellexample}[morekeywords={latexmk}] % latexmk njuthesis-sample -% \end{ctexexam} +% \end{shellexample} % % 濡傞渶鎸囧畾缂栬瘧鍣紝鍙互鍔犲叆 |-xelatex| 鎴� |-lualatex| 鍙傛暟锛屼緥濡傛寚瀹� \hologo{XeLaTeX} 鐨勫懡浠や负 -% \begin{ctexexam} +% \begin{shellexample}[morekeywords={latexmk,xelatex}] % latexmk -xelatex njuthesis-sample -% \end{ctexexam} +% \end{shellexample} % % 姝ゅ鍙互閫夋嫨浣跨敤浠ヤ笅鍛戒护娓呯悊缂栬瘧鐢熸垚鐨勪复鏃舵枃浠躲€� -% \begin{ctexexam} +% \begin{shellexample}[morekeywords={latexmk}] % latexmk -c -% \end{ctexexam} +% \end{shellexample} % % \subsection{鍦ㄧ嚎缂栬瘧} % \label{subsec:onlinecompile} @@ -454,31 +497,26 @@ through XeTeX. % % 鍏稿瀷鐨刓cls{njuthesis}涓绘枃浠剁粨鏋勫簲璇ュ涓嬫墍绀猴細 % -% \begin{ctexexam} -% \documentclass[<options>]{njuthesis} -% \njusetup { info = {<info>} } -% \graphicspath{{figure/}} -% \addbibresource{njuthesis.bib} +% \begin{latexexample}[moretexcs={\njusetup,\graphicspath,\addbibresource,\maketitle,\tableofcontents,\listoffigures,\listoftables,\mainmatter,\chapter,\printbibliography,\appendix},emph={[1]document}] +% \documentclass{njuthesis} +% \njusetup{} % \begin{document} % \maketitle -% <abstract> -% <preface> % \tableofcontents -% \listoffigures -% \listoftables % \mainmatter -% <text> -% \printbibliography[heading=bibintoc,title=鍙傝€冩枃鐚甝 -% <acknowledgement> -% \appendix -% <appendix> +% \chapter{娆㈣繋} +% 浣跨敤 \hologo{LaTeX} +% \printbibliography % \end{document} -% \end{ctexexam} +% \end{latexexample} % +% 濡傛灉浣犲皾璇曠紪璇戜笂闈㈢殑浠g爜锛屼細鍙戠幇鑷繁寰楀埌浜嗕竴涓�5椤电殑 PDF 鏂囨。锛屾槸涓€浠界┖鐧界殑鏈鐢熻鏂囥€� +% 褰撶劧锛岃繖涓枃妗e疄闄呬笂娌℃湁浠讳綍鍐呭锛屾帴涓嬫潵灏嗕細浠嬬粛鍏蜂綋濉啓鍐呭鐨勬柟娉曘€� +% % % \subsection{妯℃澘閫夐」} % -% 妯℃澘閫夐」浣嶄簬\tn{documentclass}鍚庣殑鏂规嫭鍙峰唴锛岀敤浜庢寚瀹氭ā鏉跨殑琛屼负銆� +% 妯℃澘閫夐」浣嶄簬 \tn{documentclass} 鍚庣殑鏂规嫭鍙峰唴锛岀敤浜庢寚瀹氭ā鏉跨殑琛屼负銆� % 涓嬫枃涓皷鎷彿鍐呭垪鍑轰簡鑻ュ共涓厑璁哥殑閫夐」锛屽叾涓姞绮楃殑涓洪粯璁ら€夐」銆� % % \subsubsection{瀛︿綅淇℃伅} @@ -502,7 +540,6 @@ through XeTeX. % type = <(thesis)|design> % \end{syntax} % 鐢ㄤ簬閫夋嫨鏂囨。绫诲瀷骞跺皢鐩稿叧瀛楁杈撳嚭鍦ㄥ皝闈㈠拰鎽樿椤碉紝鍙€夊€煎垎鍒负姣曚笟璁烘枃鍜屾瘯涓氳璁°€� -% % \end{function} % % @@ -718,7 +755,7 @@ through XeTeX. % % 鏈鐢熷彲浠ュ弬鑰冨涓嬭寖渚嬭緭鍏ヤ釜浜轰俊鎭€傛敞鎰忎笉鑳芥湁绌鸿銆� % -% \begin{ctexexam} +% \begin{latexexample}[moretexcs={\njusetup},emph={[2]info}] % \njusetup { % info = { % titlea = {绗竴琛屾爣棰榼, @@ -741,11 +778,11 @@ through XeTeX. % submit-date = {2021骞�8鏈�10鏃, % } % } -% \end{ctexexam} +% \end{latexexample} % % 鐮旂┒鐢熷彲浠ュ弬鑰冨涓嬪垪琛ㄨ緭鍏ヤ釜浜轰俊鎭� % -% \begin{ctexexam} +% \begin{latexexample}[moretexcs={\njusetup},emph={[2]info}] % \njusetup { % info = { % titlea = {绗竴琛屾爣棰榼, @@ -779,7 +816,7 @@ through XeTeX. % supervisor-contact = {鎷夊お璧瀛︿笌鎶€鏈闄� 鏋濇睙甯傜粨涓樿矾 19 鍙� 114514}, % } % } -% \end{ctexexam} +% \end{latexexample} % % % \subsection{缂栧啓姝f枃} @@ -801,13 +838,6 @@ through XeTeX. % \end{syntax} % \pkg{ctex} 瀹忛泦鎻愪緵浜嗗叾涓敤浜庡鐞嗛暱鏍囬鐨勫彲閫夊弬鏁般€傚浜庤繃闀跨殑鏍囬锛岀洰褰曚腑浼氫娇鐢ㄥ叾鐭弿杩般€� % \end{function} -% -% \begin{ctexexam} -% \begin{document} -% \chapter[鐭弿杩癩{鎴戠殑鏍囬} -% 鎴戠殑姝f枃 -% \end{document} -% \end{ctexexam} % % % \subsubsection{鏂囧瓧} @@ -840,29 +870,29 @@ through XeTeX. % % 涓嬮潰杩欎釜渚嬪瓙灞曠ず浜嗗浣曟彃鍏ヤ竴寮犲悕绉颁负\file{myfig.jpg}锛屽搴﹀崰椤甸潰鏂囧瓧瀹藉害涓€鍗婄殑鍥剧墖銆傛敞鎰忔爣绛惧懡浠tn{label}蹇呴』鏀惧湪鍥炬敞鍛戒护\tn{caption}涔嬪悗銆� % -% \begin{ctexexam} +% \begin{latexexample}[moretexcs={\includegraphics},emph={[1]figure}] % \begin{figure}[h] % \includegraphics[width=0.5\textwidth]{myfig} % \caption{鎴戠殑鍥緘 % \label{fig:myfig} % \end{figure} -% \end{ctexexam} +% \end{latexexample} % % % 瀵逛簬杈冧负鐦﹂暱锛屾垨鑰呬粎璧峰埌杈呭姪浣滅敤鐨勫浘鍍忥紝鍙互浣跨敤\env{wrapfigure}瀹炵幇鏂囧瓧鐜粫鏁堟灉銆傛敞鎰忚繖涓幆澧冨悗绱ц窡鐨勪竴琛屼笉鑳戒负绌恒€� % -% \begin{ctexexam} +% \begin{latexexample}[moretexcs={\includegraphics},emph={[1]wrapfigure}] % \begin{wrapfigure}{r}{0cm} % \includegraphics[width=0.15\textwidth]{myfig} % \caption{鎴戠殑鍥緘 % \label{fig:myfig} % \end{wrapfigure} % <text> -% \end{ctexexam} +% \end{latexexample} % % 浣跨敤 \pkg{caption} 鍐呯疆鐨� \pkg{subcaption} 鎻愪緵 \env{subfigure} 鐜锛屽疄鐜板寮犲浘鐗囧苟鎺掔殑鏁堟灉銆傝緝涓鸿€佹棫鐨� \pkg{subfigure} 骞朵笉鍦ㄦ鍙楀埌鏀寔銆� % -% \begin{ctexexam} +% \begin{latexexample}[moretexcs={\includegraphics},emph={[1]figure,subfigure}] % \begin{figure} % \begin{subfigure}{.32\textwidth} % \centering @@ -881,13 +911,13 @@ through XeTeX. % \end{subfigure} % \caption{subfigures} % \end{figure} -% \end{ctexexam} +% \end{latexexample} % % % \subsubsection{琛ㄦ牸} % % 涓嬮潰杩欎釜渚嬪瓙灞曠ず浜嗗浣曟彃鍏ヤ竴寮犺〃鏍笺€傞€氳繃 \pkg{booktabs} 鎻愪緵鐨� \tn{toprule}銆乗tn{midrule} 鍜� \tn{bottomrule}锛屾垜浠彲浠ュ緢杞绘澗鍦扮粯鍒跺嚭涓€寮犳紓浜鑼冪殑涓夌嚎琛ㄣ€� -% \begin{ctexexam} +% \begin{latexexample}[moretexcs={\toprule,\midrule,\bottomrule},emph={[1]table,tabular}] % \begin{table}[htbp] % \caption{鎴戠殑琛▆ % \label{tab:testtab} @@ -899,7 +929,7 @@ through XeTeX. % \bottomrule % \end{tabular} % \end{table} -% \end{ctexexam} +% \end{latexexample} % % \begin{function}{\multirow,\multicolumn} % \begin{syntax} @@ -915,11 +945,11 @@ through XeTeX. % \subsubsection{浠g爜} % % 鐢盶pkg{listings}鎻愪緵浠g爜鎺掔増銆備唬鐮佸潡\env{lstlisting}锛屾敞鎰忚繖涓幆澧冧腑鐨勭缉杩涚┖鏍间細濡傚疄杈撳嚭 -% \begin{ctexexam} +% \begin{latexexample}[emph={[1]lstlisting}] % \begin{lstlisting} % <code> % \end{lstlisting} -% \end{ctexexam} +% \end{latexexample} % % 琛岄棿浠g爜鍙互浣跨敤鎶勫綍鐜 \tn{verb} 锛堟垨鑰� \pkg{listings} 鎻愪緵鐨� \tn{lstinline}锛夛紝 % 鏍煎紡濡� |\verb!<code>!|銆傚叾涓寘瑁逛唬鐮佺殑涓や釜鎰熷徆鍙峰苟涓嶆槸缁濆鐨勶紝鍙互鏇挎崲鎴愪换浣曚袱涓浉鍚岀殑娌℃湁鍦ㄨ繖娈典唬鐮佷腑鍑虹幇杩囩殑绗﹀彿銆� @@ -932,27 +962,27 @@ through XeTeX. % 琛屽唴鍏紡褰㈠|$\mathrm{e}^{(a+2b)x}$| % % 甯︽湁缂栧彿鐨勮闂村叕寮廫env{equation} -% \begin{ctexexam} +% \begin{latexexample}[emph={[1]equation}] % \begin{equation}\label{eq:myeqlabel} % \pi % \end{equation} -% \end{ctexexam} +% \end{latexexample} % % 濡備笉闇€瑕佺紪鍙凤紝鍙互鐢╘env{equation*}鎴栬€� |\[<eq>\]| % % 鏈ā鏉夸篃鎻愪緵浜嗕竴绯诲垪鐨勬暟瀛︾幆澧冦€傝瘉鏄庣幆澧冧細鍦ㄧ粨灏炬坊鍔犺瘉姣曠鍙枫€� -% \begin{ctexexam} +% \begin{latexexample} % \begin{proof} % 璇佹槑鎴戞槸鎴� % \end{proof} -% \end{ctexexam} +% \end{latexexample} % % 鏅€氱幆澧� -% \begin{ctexexam} +% \begin{latexexample} % \begin{definition}[浠栦汉] % 瀹氫箟浠栦汉鍗冲湴鐙� % \end{definition} -% \end{ctexexam} +% \end{latexexample} % % % \subsubsection{寮曠敤} @@ -979,7 +1009,7 @@ through XeTeX. % % \subsection{鐗规畩椤甸潰} % -% 鏈ā鏉胯繕鎻愪緵涓€绯诲垪鐜鐢ㄤ簬鐢熸垚鎵€闇€鐨勭壒娈婇〉闈� +% 鏈ā鏉胯繕鎻愪緵涓€绯诲垪鍛戒护涓庣幆澧冪敤浜庣敓鎴愭墍闇€鐨勭壒娈婇〉闈€€� % % \subsubsection{灏侀潰} % @@ -993,15 +1023,15 @@ through XeTeX. % \subsubsection{鎽樿椤祡 % \changes{v0.11}{2021/10/01}{绠€鍖栦簡鎽樿鐨勭紪鍐欐柟寮忋€倉 % -% \begin{ctexexam} +% \begin{latexexample}[emph={[1]abstract,abstract*}] % \begin{abstract} % 鎴戠殑涓枃鎽樿 % \end{abstract} % % \begin{abstract*} -% My abstract in English +% Abstract in English % \end{abstract*} -% \end{ctexexam} +% \end{latexexample} % % % \subsubsection{鍓嶈█椤祡 @@ -1010,7 +1040,7 @@ through XeTeX. % 浣跨敤\env{preface}鐜瀹氫箟 % \end{function} % -% \begin{ctexexam} +% \begin{latexexample}[emph={[1]preface,flushright}] % \begin{preface} % 鎴戠殑鍓嶈█ % \vspace{1cm} @@ -1019,7 +1049,7 @@ through XeTeX. % 鏃堕棿鍦扮偣 % \end{flushright} % \end{preface} -% \end{ctexexam} +% \end{latexexample} % % \subsubsection{鐩綍椤祡 % @@ -1034,30 +1064,18 @@ through XeTeX. % 鍚屽墠瑷€锛屼娇鐢╘env{acknowledgement}鐜 % \end{function} % -% \begin{ctexexam} +% \begin{latexexample}[emph={[1]acknowledgement}] % \begin{acknowledgement} % 鎰熻阿NJU LUG % \end{acknowledgement} -% \end{ctexexam} -% -% -% \subsubsection{鍙傝€冩枃鐚〉} -% -% 浣跨敤浠ヤ笅鍛戒护锛孿opt{bibintoc}鍙互灏嗗弬鑰冩枃鐚〉鎻掑叆鐩綍 -% -% \begin{ctexexam} -% \printbibliography[heading=bibintoc,title=鍙傝€冩枃鐚甝 -% \end{ctexexam} +% \end{latexexample} % % % \subsubsection{闄勫綍椤祡 % % \begin{function}{\appendix} -% % 闄勫綍鏀惧湪鏈懡浠ゅ悗锛屼互鑻辨枃瀛楁瘝杩涜缂栧彿锛岀紪鍐欐柟寮忓悓姝f枃 % \end{function} -% -% 鏄惁闇€瑕佺储寮曪紵 % % % \subsubsection{鎴愭灉鍒楄〃} @@ -1071,27 +1089,21 @@ through XeTeX. % % \subsection{鍙傝€冩枃鐚畗 % -% 绗﹀悎GB7714-2015瑙勮寖銆備娇鐢╘hologo{biber}浣滀负\hologo{BibTeX}鍚庣銆傞渶瑕佷娇鐢▅biber|鍛戒护鎵嬪姩缂栬瘧鎵嶄細鏄剧ず +% 绗﹀悎GB7714-2015瑙勮寖銆備娇鐢╘hologo{biber}浣滀负鍚庣銆傞渶瑕佷娇鐢� |biber| 鍛戒护鎵嬪姩缂栬瘧鎵嶄細鏄剧ず % % \begin{function}{\addbibresource} % \begin{syntax} % \tn{addbibresource}\Arg{鏂囦欢} % \end{syntax} -% -% 榛樿鍙傝€冩枃鐚瓨鍌ㄤ簬涓荤洰褰曚笅鐨刓file{njuthesis.bib}锛岀洿鎺ュ悜鍏朵腑绮樿创鏂扮殑鍙傝€冩枃鐚嵆鍙€傚鏋滃笇鏈涢澶栨坊鍔犲弬鑰冩枃鐚垪琛紝鍙互鍦ㄥ瑷€鍖轰腑澶氭璋冪敤\tn{addbibresource}鍛戒护銆傛敞鎰忔湰鍛戒护涓巪\bibliography{bibfile1,bibfile2}|涓嶅悓锛屼笉鍙互鐢ㄩ€楀彿鍒嗛殧澶氫釜杈撳叆鏂囦欢锛屼笖蹇呴』浣跨敤甯︽墿灞曞悕鐨勫畬鏁存枃浠跺悕銆� +% 娣诲姞鍙傝€冩枃鐚簮鏂囦欢銆� % \end{function} % -% -% \subsubsection{浣跨敤EndNote} -% -% 鍗椾含澶у淇℃伅鍖栧缓璁剧鐞嗘湇鍔′腑蹇冨凡璐拱\href{https://itsc.nju.edu.cn/EndNote/list.htm}{EndNote}渚涘叏鏍″笀鐢熷厤璐硅瘯鐢紝鏈€鏂扮増涓篍ndNote 20銆� +% 绀轰緥鍙傝€冩枃鐚瓨鍌ㄤ簬 \file{njuthesis-sample.bib}锛岀洿鎺ュ悜鍏朵腑绮樿创鏂扮殑鍙傝€冩枃鐚嵆鍙€傚鏋滃笇鏈涢澶栨坊鍔犲弬鑰冩枃鐚垪琛紝鍙互鍦ㄥ瑷€鍖轰腑澶氭璋冪敤 \tn{addbibresource} 鍛戒护銆傛敞鎰忔湰鍛戒护涓� |\bibliography{bibfile1,bibfile2}| 涓嶅悓锛屼笉鍙互鐢ㄩ€楀彿鍒嗛殧澶氫釜杈撳叆鏂囦欢锛屼笖蹇呴』浣跨敤甯︽墿灞曞悕鐨勫畬鏁存枃浠跺悕銆� % +% \begin{function}{\printbibliography} +% 鐢熸垚鍙傝€冩枃鐚垪琛ㄩ〉闈€€� +% \end{function} % -% \subsubsection{浣跨敤Zotero} -% -% \href{https://www.zotero.org/}{Zotero}鏄竴娆惧厤璐圭殑鏂囩尞绠$悊杞欢锛屾敮鎸佹墍鏈夋闈㈠钩鍙般€� -% -% 鍦ㄤ繚鎸乑otero绋嬪簭杩愯鐨勬儏鍐典笅锛岀偣鍑绘祻瑙堝櫒宸ュ叿鏍忕殑Zotero Connector鎻掍欢鍗冲彲鑷姩浠庣綉椤垫姄鍙栧弬鑰冩枃浠朵俊鎭€俍otero鍙互閫氳繃\href{https://github.com/l0o0/jasminum}{jasminum鎻掍欢}鏀寔涓枃鍙傝€冩枃鐚殑璇嗗埆銆傚湪閫変腑甯屾湜浣跨敤鐨勬枃鐚悗鍙抽敭瀵煎嚭鏂囩尞鏉$洰鍗冲彲鐢熸垚\file{.bib}鏂囦欢銆� % % \subsubsection{鏂囨鍐呭紩鐢▆ % @@ -1103,23 +1115,39 @@ through XeTeX. % \end{syntax} % 寮曠敤鏂囩尞 % \end{function} +% +% +% \subsubsection{鏂囩尞绠$悊} +% +% \subparagraph{浣跨敤EndNote} +% +% 鍗椾含澶у淇℃伅鍖栧缓璁剧鐞嗘湇鍔′腑蹇冨凡璐拱\href{https://itsc.nju.edu.cn/EndNote/list.htm}{EndNote}渚涘叏鏍″笀鐢熷厤璐硅瘯鐢紝鏈€鏂扮増涓篍ndNote 20銆� +% +% +% \subparagraph{浣跨敤Zotero} +% +% \href{https://www.zotero.org/}{Zotero}鏄竴娆惧厤璐圭殑鏂囩尞绠$悊杞欢锛屾敮鎸佹墍鏈夋闈㈠钩鍙般€� +% +% 鍦ㄤ繚鎸乑otero绋嬪簭杩愯鐨勬儏鍐典笅锛岀偣鍑绘祻瑙堝櫒宸ュ叿鏍忕殑Zotero Connector鎻掍欢鍗冲彲鑷姩浠庣綉椤垫姄鍙栧弬鑰冩枃浠朵俊鎭€俍otero鍙互閫氳繃\href{https://github.com/l0o0/jasminum}{jasminum鎻掍欢}鏀寔涓枃鍙傝€冩枃鐚殑璇嗗埆銆傚湪閫変腑甯屾湜浣跨敤鐨勬枃鐚悗鍙抽敭瀵煎嚭鏂囩尞鏉$洰鍗冲彲鐢熸垚\file{.bib}鏂囦欢銆� +% % % \subsection{瑙嗚璇嗗埆绯荤粺} % % 瑙嗚璇嗗埆绯荤粺 \pkg{njuvisual} 鐜板凡琚垎绂讳负鐙珛瀹忓寘锛屽熀鏈娇鐢ㄦ柟娉曚妇渚嬪涓嬶細 -% \begin{ctexexam} +% \begin{latexexample}[moretexcs={\njuemblem}] % \njuemblem{!}{3cm} % 榛樿鐢熸垚鎸囧畾澶у皬鐨勭传鑹插崡澶ф牎寰� % \njuname{4cm}{!} % 榛樿鐢熸垚鎸囧畾澶у皬鐨勭传鑹插崡澶т腑鏂囨牎鍚� % \njuname*{4cm}{!} % 榛樿鐢熸垚鎸囧畾澶у皬鐨勭传鑹插崡澶ц嫳鏂囨牎鍚� % \njuemblem[black]{!}{3cm} % 榛戣壊鐨勫崡澶ф牎寰� % \njuemblem[department=dii]{!}{4cm} % 绱壊鍖¢櫌寰芥爣 % \njuemblem[department=cs,color=blue]{!}{3cm} % 绾摑鑹茶绉戝窘鏍� -% \end{ctexexam} +% \end{latexexample} % % 鏈畯鍖呯殑璇︾粏浣跨敤鏂规硶璇峰弬鑰冨叾\href{http://mirrors.ctan.org/macros/latex/contrib/njuvisual/njuvisual.pdf}{璇存槑鏂囨。}銆� % % \end{documentation} % +% % \begin{implementation} % % \section{浠g爜瀹炵幇} @@ -1134,9 +1162,9 @@ through XeTeX. % 鈥渱*|鈥濆拰鈥渱/|鈥濈殑 guard 鍑虹幇鍦ㄨ鍙峰彸渚э紝瀹冧滑鐢ㄦ潵纭畾 % 鍗曠嫭涓€琛屼唬鐮佺殑褰掑睘銆傝繖浜� guard 鐨勯鑹叉繁娴呬笉涓€锛岀敤浠ユ槑纭祵濂楀叧绯汇€� % -% 鍙︽湁鑻ュ共鍖呭惈|@@|鐨刧uard锛屽湪 \pkg{l3docstrip} 涓〃绀哄悕绌洪棿锛堟ā鍧楋級銆� -% 鍦ㄥ垹闄ゆ敞閲婄敓鎴愭牸寮忔枃浠舵椂锛屽彉閲忓悕绉颁腑鐨剕@@|浼氳绛夊彿鍚庣殑瀛楁鏇挎崲锛� -% 璀鍦ㄦ湰妯℃澘\cls{njuthesis}涓� |@@=nju|銆� +% 鍙︽湁鑻ュ共鍖呭惈 |@@| 鐨刧uard锛岀敤浠ヨ〃绀哄悕绌洪棿锛堟ā鍧楋級銆� +% 鍦ㄥ垹闄ゆ敞閲婄敓鎴愭牸寮忔枃浠舵椂锛屽彉閲忓悕绉颁腑鐨� |@@| 浼氳绛夊彿鍚庣殑瀛楁鏇挎崲锛� +% 璀鍦ㄦ湰妯℃澘 \cls{njuthesis} 涓� |@@=nju|銆� % % % \subsection{鍑嗗} @@ -1269,53 +1297,53 @@ through XeTeX. % 瀛︿綅淇℃伅鐨勮缃� % \begin{macrocode} \keys_define:nn { nju } -{ + { % \end{macrocode} % % \begin{macro}{degree} % 瀛︿綅绫诲瀷銆� % \begin{macrocode} - degree .choices:nn = - { ug, mg, mf, phd } - { \int_set_eq:NN \g_@@_info_degree_int \l_keys_choice_int + degree .choices:nn = + { ug, mg, mf, phd } + { \int_set_eq:NN \g_@@_info_degree_int \l_keys_choice_int % \end{macrocode} % 杩涜瀛︿綅鐨勫垽鏂€� % \begin{macrocode} - \int_compare:nTF { \g_@@_info_degree_int == 1 } - { \tl_set:Nn \g_@@_info_diploma_tl { ug } } - { \tl_set:Nn \g_@@_info_diploma_tl { g } } }, - degree .initial:n = ug, + \int_compare:nTF { \g_@@_info_degree_int == 1 } + { \tl_set:Nn \g_@@_info_diploma_tl { ug } } + { \tl_set:Nn \g_@@_info_diploma_tl { g } } }, + degree .initial:n = ug, % \end{macrocode} % \end{macro} % % \begin{macro}{type} % 璁烘枃绫诲瀷銆� % \begin{macrocode} - type .choices:nn = - { thesis, design } - { \int_set_eq:NN \g_@@_info_type_int \l_keys_choice_int }, - type .initial:n = thesis, + type .choices:nn = + { thesis, design } + { \int_set_eq:NN \g_@@_info_type_int \l_keys_choice_int }, + type .initial:n = thesis, % \end{macrocode} % \end{macro} % % \begin{macro}{nlcover} % 鏄惁闇€瑕佸浗瀹跺浘涔﹂灏侀潰鐨勮缃€� % \begin{macrocode} - nlcover .bool_set:N = \g_@@_nlcover_bool, - nlcover .initial:n = false, + nlcover .bool_set:N = \g_@@_nlcover_bool, + nlcover .initial:n = false, % \end{macrocode} % \end{macro} % % \begin{macro}{customlatinfont,customchinesefont} % 瀹氫箟瀛椾綋閫夐」 % \begin{macrocode} - customlatinfont .choices:nn = - { gyre, macos, windows, none } - { \tl_set_eq:NN \g_@@_latin_fontset_tl \l_keys_choice_tl }, - customchinesefont .choices:nn = - { fandol, founder, macos, noto, windows, none } - { \tl_set_eq:NN \g_@@_cjk_fontset_tl \l_keys_choice_tl }, -} + customlatinfont .choices:nn = + { gyre, macos, windows, none } + { \tl_set_eq:NN \g_@@_latin_fontset_tl \l_keys_choice_tl }, + customchinesefont .choices:nn = + { fandol, founder, macos, noto, windows, none } + { \tl_set_eq:NN \g_@@_cjk_fontset_tl \l_keys_choice_tl }, + } % \end{macrocode} % \end{macro} % @@ -1330,24 +1358,21 @@ through XeTeX. % \subsection{涓汉淇℃伅} % 杈撳叆涓汉淇℃伅鐨勫尯鍩熴€� % \begin{macrocode} -\keys_define:nn { nju } -{ - info.meta:nn = { nju / info } { #1 } -} +\keys_define:nn { nju } { info.meta:nn = { nju / info } { #1 } } % \end{macrocode} % % \begin{macrocode} \keys_define:nn { nju / info } -{ + { % \end{macrocode} % % \begin{macro}{info/titlea,info/titleb,info/titlec,info/title*} % 棰樼洰銆備互涓嬫爣娉ㄦ槦鍙凤紙*锛夌殑涓哄搴旂殑鑻辨枃瀛楁銆� % \begin{macrocode} - titlea .tl_set:N = \l_@@_info_title_a_tl, - titleb .tl_set:N = \l_@@_info_title_b_tl, - titlec .tl_set:N = \l_@@_info_title_c_tl, - title* .tl_set:N = \l_@@_info_title_en_tl, + titlea .tl_set:N = \l_@@_info_title_a_tl, + titleb .tl_set:N = \l_@@_info_title_b_tl, + titlec .tl_set:N = \l_@@_info_title_c_tl, + title* .tl_set:N = \l_@@_info_title_en_tl, % \end{macrocode} % \end{macro} % @@ -1355,78 +1380,78 @@ through XeTeX. % \changes{v0.11}{2021/10/01}{淇敼浜嗘坊鍔犲叧閿瘝鐨勬柟寮忋€倉 % 鍏抽敭璇嶅垪琛ㄣ€� % \begin{macrocode} -keywords .clist_set:N = \l_@@_info_keywords_clist, -keywords* .clist_set:N = \l_@@_info_keywords_en_clist, + keywords .clist_set:N = \l_@@_info_keywords_clist, + keywords* .clist_set:N = \l_@@_info_keywords_en_clist, % \end{macrocode} % \end{macro} % % \begin{macro}{info/grade,info/student-id,info/author,info/author*} % 骞寸骇銆佸鍙枫€佸鍚嶃€� % \begin{macrocode} - grade .tl_set:N = \l_@@_info_grade_tl, - student-id .tl_set:N = \l_@@_info_id_tl, - author .tl_set:N = \l_@@_info_author_tl, - author* .tl_set:N = \l_@@_info_author_en_tl, + grade .tl_set:N = \l_@@_info_grade_tl, + student-id .tl_set:N = \l_@@_info_id_tl, + author .tl_set:N = \l_@@_info_author_tl, + author* .tl_set:N = \l_@@_info_author_en_tl, % \end{macrocode} % \end{macro} % % \begin{macro}{info/department,info/department*,info/major,info/major*,info/field,info/field*} % 闄㈢郴銆佷笓涓氥€佹柟鍚戙€� % \begin{macrocode} - department .tl_set:N = \l_@@_info_dept_tl, - department* .tl_set:N = \l_@@_info_dept_en_tl, - major .tl_set:N = \l_@@_major_tl, - major* .tl_set:N = \l_@@_major_en_tl, - field .tl_set:N = \l_@@_field_tl, - field* .tl_set:N = \l_@@_field_en_tl, + department .tl_set:N = \l_@@_info_dept_tl, + department* .tl_set:N = \l_@@_info_dept_en_tl, + major .tl_set:N = \l_@@_major_tl, + major* .tl_set:N = \l_@@_major_en_tl, + field .tl_set:N = \l_@@_field_tl, + field* .tl_set:N = \l_@@_field_en_tl, % \end{macrocode} % \end{macro} % % \begin{macro}{info/supervisora,info/supervisora*,info/supervisora-title,info/supervisora-title*} % 瀵煎笀 % \begin{macrocode} - supervisora .tl_set:N = \l_@@_info_supv_a_tl, - supervisora* .tl_set:N = \l_@@_info_supv_a_en_tl, - supervisora-title .tl_set:N = \l_@@_info_supv_a_title_tl, - supervisora-title*.tl_set:N = \l_@@_info_supv_a_title_en_tl, + supervisora .tl_set:N = \l_@@_info_supv_a_tl, + supervisora* .tl_set:N = \l_@@_info_supv_a_en_tl, + supervisora-title .tl_set:N = \l_@@_info_supv_a_title_tl, + supervisora-title*.tl_set:N = \l_@@_info_supv_a_title_en_tl, % \end{macrocode} % \end{macro} % % \begin{macro}{info/supervisorb,info/supervisorb*,info/supervisorb-title,info/supervisorb-title*} % 绗簩瀵煎笀 % \begin{macrocode} - supervisorb .tl_set:N = \l_@@_info_supv_b_tl, - supervisorb* .tl_set:N = \l_@@_info_supv_b_en_tl, - supervisorb-title .tl_set:N = \l_@@_info_supv_b_title_tl, - supervisorb-title*.tl_set:N = \l_@@_info_supv_b_title_en_tl, + supervisorb .tl_set:N = \l_@@_info_supv_b_tl, + supervisorb* .tl_set:N = \l_@@_info_supv_b_en_tl, + supervisorb-title .tl_set:N = \l_@@_info_supv_b_title_tl, + supervisorb-title*.tl_set:N = \l_@@_info_supv_b_title_en_tl, % \end{macrocode} % \end{macro} % % \begin{macro}{info/submit-date,info/submit-date*} % 鎻愪氦鏃ユ湡 % \begin{macrocode} - submit-date .tl_set:N = \l_@@_submit_date_tl, - submit-date* .tl_set:N = \l_@@_submit_date_en_tl, + submit-date .tl_set:N = \l_@@_submit_date_tl, + submit-date* .tl_set:N = \l_@@_submit_date_en_tl, % \end{macrocode} % \end{macro} % % \begin{macro}{info/defend-date,info/chairman,info/reviewer} % 绛旇京淇℃伅銆� % \begin{macrocode} - defend-date .tl_set:N = \l_@@_defend_date_tl, - chairman .tl_set:N = \l_@@_info_chairman_tl, - reviewer .clist_set:N = \l_@@_info_reviewer_clist, + defend-date .tl_set:N = \l_@@_defend_date_tl, + chairman .tl_set:N = \l_@@_info_chairman_tl, + reviewer .clist_set:N = \l_@@_info_reviewer_clist, % \end{macrocode} % \end{macro} % % \begin{macro}{info/clc,info/secret-level,info/udc,info/supervisor-contact} % 鍥藉鍥句功棣嗗皝闈㈢浉鍏充俊鎭€� % \begin{macrocode} - clc .tl_set:N = \l_@@_info_clc_tl, - secret-level .tl_set:N = \l_@@_info_seclv_tl, - udc .tl_set:N = \l_@@_info_udc_tl, - supervisor-contact.tl_set:N = \l_@@_info_supv_cont_tl, -} + clc .tl_set:N = \l_@@_info_clc_tl, + secret-level .tl_set:N = \l_@@_info_seclv_tl, + udc .tl_set:N = \l_@@_info_udc_tl, + supervisor-contact.tl_set:N = \l_@@_info_supv_cont_tl, + } % \end{macrocode} % \end{macro} % @@ -1435,8 +1460,7 @@ keywords* .clist_set:N = \l_@@_info_keywords_en_clist, % \changes{v0.11}{2021/10/01}{灏嗕釜浜轰俊鎭彉閲忓悕鏀逛负灏忓啓瀛楁瘝鍔犺繛瀛楃鐨勫舰寮忋€倉 % 瀹氫箟鐢ㄤ簬璁剧疆涓汉淇℃伅鐨勫懡浠� % \begin{macrocode} -\NewDocumentCommand \njusetup { m } -{ \keys_set:nn { nju } { #1 } } +\NewDocumentCommand \njusetup { m } { \keys_set:nn { nju } { #1 } } % \end{macrocode} % \end{macro} % @@ -1467,29 +1491,19 @@ keywords* .clist_set:N = \l_@@_info_keywords_en_clist, % \pkg{emptypage}鐢ㄤ簬娓呴櫎绌虹櫧椤电殑椤电爜銆� % \begin{macrocode} \RequirePackage -{ - geometry, - caption, - floatrow, - setspace, - emptypage, - fancyhdr, -} + { + geometry, + caption, + floatrow, + setspace, + emptypage, + fancyhdr, + hologo + } \RequirePackage[titles]{tocloft} \RequirePackage[hyphens]{url} % generate better linebreaks in the url % \end{macrocode} % -% 鐢ㄤ簬鐢熸垚鍙互琚彃鍏ヤ功绛剧殑LaTeX logo锛孴ODO: 浣跨敤hologo鍒涘缓|latex{}|鍛戒护 -% \begin{macrocode} -\RequirePackage{hologo} -% \end{macrocode} -% -% \begin{macrocode} -% Required to prevent page break right after a sectioning command -% \RequirePackage{needspace} -% \RequirePackage{xspace} % Better print trailing whitespace -% \end{macrocode} -% % \begin{macro}{\njuline} % 閽堝缂栬瘧寮曟搸锛屼娇鐢ㄤ笉鍚岀殑瀹忓寘鏋勫缓鍙互瀵逛腑鏂囨甯告崲琛岀殑涓嬪垝绾垮懡浠ゃ€俓pkg{lua-ul} 涓渶瑕佸湪缁撳熬浣跨敤\tn{null}淇濇姢灏鹃儴绌虹櫧銆� % \begin{macrocode} @@ -1583,10 +1597,10 @@ keywords* .clist_set:N = \l_@@_info_keywords_en_clist, % \begin{macrocode} \tl_if_empty:NTF \g_@@_latin_fontset_tl { \bool_gset_true:N \g_@@_load_system_fontset_bool } -{ - \tl_if_empty:NT \g_@@_cjk_fontset_tl - { \bool_gset_true:N \g_@@_load_system_fontset_bool } -} + { + \tl_if_empty:NT \g_@@_cjk_fontset_tl + { \bool_gset_true:N \g_@@_load_system_fontset_bool } + } % \end{macrocode} % % 杩涜绯荤粺妫€娴嬨€� @@ -1950,7 +1964,7 @@ keywords* .clist_set:N = \l_@@_info_keywords_en_clist, % \end{macrocode} % % \begin{macro}{\tableofcontents} - % 閲嶅畾涔夌洰褰曞懡浠わ紝淇敼鏍囬鏍煎紡骞舵彃鍏ヤ功绛俱€� +% 閲嶅畾涔夌洰褰曞懡浠わ紝淇敼鏍囬鏍煎紡骞舵彃鍏ヤ功绛俱€� % \begin{macrocode} \RenewDocumentCommand \tableofcontents { } { @@ -2045,7 +2059,7 @@ keywords* .clist_set:N = \l_@@_info_keywords_en_clist, % \end{macro} % % \subsection{鍙傝€冩枃鐚畗 -% +% % biblatex璁剧疆 % \begin{macrocode} \RequirePackage[ @@ -2075,6 +2089,16 @@ keywords* .clist_set:N = \l_@@_info_keywords_en_clist, ]{biblatex} % \end{macrocode} % +% \changes{v0.12}{2021/12/06}{璁剧疆杈撳嚭鍙傝€冩枃鐚殑榛樿閫夐」銆倉 +% 璁剧疆鍙傝€冩枃鐚悕绉� +% \begin{macrocode} +\ctexset{ bibname = {鍙傝€冩枃鐚畗 } +% \end{macrocode} +% 灏嗗弬鑰冩枃鐚彃鍏ョ洰褰� +% \begin{macrocode} +\DeclarePrintbibliographyDefaults{ heading = bibintoc } +% \end{macrocode} +% % 蹇界暐涓嶉渶瑕佺殑鏂囩尞淇℃伅銆� % \begin{macrocode} \AtEveryBibitem{ @@ -2119,7 +2143,7 @@ keywords* .clist_set:N = \l_@@_info_keywords_en_clist, % \crefname{assumption}{鍋囪}{鍋囪} % \end{macrocode} % -% \pkg{hyperref} +% \pkg{hyperref} 瑕嗗啓浜嗗ぇ閲忓懡浠わ紝鍥犳闇€瑕佸湪鏈€鍚庤浇鍏ャ€� % \changes{v0.11}{2021/10/01}{鍐欏叆PDF鍏冩暟鎹€倉 % \begin{macrocode} \ctex_at_end_preamble:n -- GitLab