Skip to content

Commit 65e82b5

Browse files
committed
MOD: 允许 \advisors, \institute 中用 \\ 分隔多项
Former-commit-id: 253b649
1 parent af25dc0 commit 65e82b5

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

Style/ucasthesis.cls

+20-4
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
\def\ucas@value@ch@advisor{}
164164
\newcommand{\advisor}[1]{\def\ucas@value@ch@advisor{#1}}
165165
\def\ucas@value@ch@advisors{}
166-
\newcommand{\advisors}[1]{\def\ucas@value@ch@advisors{#1}}
166+
\newcommand{\advisors}[1]{\long\def\ucas@value@ch@advisors{#1}}
167167
\def\ucas@value@ch@degree{}
168168
\newcommand{\degree}[1]{\def\ucas@value@ch@degree{#1}}
169169
\def\ucas@value@ch@degreetype{}
@@ -173,7 +173,7 @@
173173
\def\ucas@value@ch@major{}
174174
\newcommand{\major}[1]{\def\ucas@value@ch@major{#1}}
175175
\def\ucas@value@ch@institute{}
176-
\newcommand{\institute}[1]{\def\ucas@value@ch@institute{#1}}
176+
\newcommand{\institute}[1]{\long\def\ucas@value@ch@institute{#1}}
177177
\def\ucas@value@ch@school{}
178178
\newcommand{\school}[1]{\def\ucas@value@ch@school{#1}}
179179
\def\ucas@value@ch@orginization{}
@@ -261,6 +261,22 @@
261261
%-
262262
%-> Define Chinese style
263263
%-
264+
\ExplSyntaxOn
265+
\newcommand\ucas@titlepage@formatter[1]{
266+
\seq_set_split:NnV \l_tmpa_seq {\\} {#1}
267+
\clist_set_from_seq:NN \l_tmpa_clist \l_tmpa_seq
268+
\clist_clear:N \l_tmpb_clist
269+
\clist_map_inline:Nn \l_tmpa_clist
270+
{
271+
\clist_put_right:Nn \l_tmpb_clist
272+
{ \ulenhance[1.2pt]{\ulextend{##1}} }
273+
}
274+
\clist_show:N\l_tmpb_clist
275+
\clist_use:Nn \l_tmpb_clist { \\ & }
276+
\PackageWarning{test}{ xxx }
277+
}
278+
\ExplSyntaxOff
279+
264280
\newcommand{\maketitle@xpdc}{%
265281
\cleardoublepage
266282
\thispagestyle{empty}
@@ -289,10 +305,10 @@
289305
\begin{tabular}{lc}
290306
\ucas@label@ch@author & \ulenhance[1.2pt]{\ulextend{\ucas@value@ch@author}}\\
291307
\ucas@label@ch@advisor & \ulenhance[1.2pt]{\ulextend{\ucas@value@ch@advisor}}\\
292-
& \ulenhance[1.2pt]{\ulextend{\ucas@value@ch@advisors}}\\
308+
& \ucas@titlepage@formatter{\ucas@value@ch@advisors}\\
293309
\ucas@label@ch@degree & \ulenhance[1.2pt]{\ulextend{\ucas@value@ch@degreetype\ucas@value@ch@degree}}\\
294310
\ucas@label@ch@major & \ulenhance[1.2pt]{\ulextend{\ucas@value@ch@major}}\\
295-
\ucas@label@ch@institute & \ulenhance[1.2pt]{\ulextend{\ucas@value@ch@institute}}\\
311+
\ucas@label@ch@institute & \ucas@titlepage@formatter{\ucas@value@ch@institute}\\
296312
\end{tabular}
297313

298314
\vspace*{\stretch{4}}

0 commit comments

Comments
 (0)