diff --git a/njuthesis.cls b/njuthesis.cls index ae51c81bcc5e0563e55c98b5360665ea7df9c169..321baafa44654bdf620db551afe9d5cf04eacefc 100644 --- a/njuthesis.cls +++ b/njuthesis.cls @@ -39,8 +39,8 @@ \ifthenelse{\equal{\Type}{thesis}} { - \newcommand{\typename}{\Degree 姣曚笟璁烘枃} + \NewDocumentCommand \typename {} {\Degree 姣曚笟璁烘枃} } { - \newcommand{\typename}{\Degree 姣曚笟璁捐} + \NewDocumentCommand \typename {} {\Degree 姣曚笟璁捐} } \ No newline at end of file diff --git a/profile/command.tex b/profile/command.tex deleted file mode 100644 index af0801ac033afdd30afedd33d4b5af199324a162..0000000000000000000000000000000000000000 --- a/profile/command.tex +++ /dev/null @@ -1,7 +0,0 @@ -% 灏侀潰涓嬪垝绾� -\cs_new:Npn \cover_underline:nn #1 #2 { - \tl_if_empty:nTF {#1} - {\tl_set:Nn #1 {\textwidth}} - {} - \uline{\makebox[#1]{#2}} -} diff --git a/profile/format/abstract.tex b/profile/format/abstract.tex index 995699b1229e44bfccf9a2e5c554f2f1c3cc8759..03ff46de441a72bde5f7681e66ee14a43d1baf1d 100644 --- a/profile/format/abstract.tex +++ b/profile/format/abstract.tex @@ -1,4 +1,5 @@ -\newenvironment{abstract}{% +\NewDocumentEnvironment{abstract} {} +{% \pagestyle{plain} \pagenumbering{Roman} \begin{center} @@ -23,13 +24,14 @@ } % 涓枃鍏抽敭璇� -\cs_new:Npn \keywords #1 {% +\NewDocumentCommand \keywords {m} {% \par\vspace{2ex}\noindent% {\kaishu\zihao{-4}\makebox[4em][s]{鍏抽敭璇峽锛殅}}~{#1}% } % 鑻辨枃鎽樿 -\newenvironment{englishabstract}{% +\NewDocumentEnvironment{englishabstract} {} +{% \pagestyle{plain} \begin{center} \kaishu\zihao{-2}{\textbf{\uuline{鍗椾含澶у鏈鐢熸瘯涓氳鏂�(璁捐銆佷綔鍝�)鑻辨枃鎽樿}}} @@ -51,7 +53,7 @@ } % 鑻辨枃鍏抽敭璇� -\cs_new:Npn \englishkeywords #1 {% +\NewDocumentCommand \englishkeywords {m} {% \par\vspace{2ex}\noindent% {KEYWORDS{:}}~~{#1}% } \ No newline at end of file diff --git a/profile/format/cover.tex b/profile/format/cover.tex index 9ec8e38a86f6749c6bb72e09ddc0460d02b04e47..593c0bc84ee81ee22393f8ebbbdf50a7f92c965a 100644 --- a/profile/format/cover.tex +++ b/profile/format/cover.tex @@ -1,3 +1,9 @@ +% 灏侀潰涓嬪垝绾� +\cs_new:Npn \cover_underline:nn #1 #2 { + \uline{\makebox[#1]{#2}} +} + +% 灏侀潰鏍囬 \tl_new:N \cover_oneline_title \tl_set:Nn \cover_oneline_title { \begin{tabular}{p{4.2em}c} @@ -39,10 +45,10 @@ \end{tabular} } -\tl_set:Nn \maketitle {% +% 閲嶅畾涔塵aketitle鐢熸垚灏侀潰 +\RenewDocumentCommand \maketitle {} {% \thispagestyle{empty} \pagenumbering{Roman} -% \pdfbookmark[0]{\njut@cap@cover}{cover} % Start \begin{spacing}{1.25} \vskip 0mm diff --git a/profile/packages.tex b/profile/packages.tex index 185dd56e771c34a66b38b9b00843a10064ff265b..2867941b4054ac71887da9b0aa994ea8d232f30c 100644 --- a/profile/packages.tex +++ b/profile/packages.tex @@ -4,6 +4,7 @@ \RequirePackage{geometry} \RequirePackage{ifthen} \RequirePackage{expl3} +\RequirePackage{xparse} \RequirePackage{titlesec} \RequirePackage{graphicx} \RequirePackage{ulem} diff --git a/profile/profile.cls b/profile/profile.cls index c8b355f54565d115d24fb92243a509bf67da3f86..556c86f6dc4982998dd37adcb0b3849a8609d57d 100644 --- a/profile/profile.cls +++ b/profile/profile.cls @@ -4,7 +4,6 @@ \input{profile/#1} } -\profile_input{command.tex} \profile_input{packages.tex} \profile_input{format.tex}