Skip to content

Commit

Permalink
根据 2024 教务处规范进行本科生模板修改
Browse files Browse the repository at this point in the history
  • Loading branch information
xkwxdyy committed Apr 26, 2024
1 parent 7e3aec7 commit d0d0ec8
Show file tree
Hide file tree
Showing 11 changed files with 190 additions and 75 deletions.
2 changes: 1 addition & 1 deletion CCNUthesis-main.bib
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ @inproceedings{邱泽奇会议论文rawtype
}
@book{马克思rawtype,
title = {马克思恩格斯选集(第1卷},
title = {马克思恩格斯选集(第一卷},
location = {北京},
publisher = {人民出版社},
year = {1995},
Expand Down
123 changes: 91 additions & 32 deletions CCNUthesis.cls
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
\ProvidesExplClass {CCNUthesis} {2024-04-05} {v1.4.1}
\ProvidesExplClass {CCNUthesis} {2024-04-27} {v1.4.2}
{Thesis template for Central China Normal University}
\RequirePackage { l3keys2e, xparse }

Expand Down Expand Up @@ -472,7 +472,7 @@
\clist_map_inline:nn
{
{ abstract } { 内容摘要 } { Abstract },
{ keywords } { 关键词 } { Keywords },
{ keywords } { 关键词 } { Key~words },
}
{ \__ccnu_define_name:nnn #1 }

Expand Down Expand Up @@ -889,13 +889,13 @@
{
\__ccnu_set_fullwidth_stop_catcode:
% 设置标点为 kaiming 式
\keys_set:nn { ctex } { punct = kaiming }
% \keys_set:nn { ctex } { punct = kaiming }
},
fullwidth-stop / mapping .code:n =
{
\clist_gset:Nn \g__xeCJK_default_features_clist
{ Mapping = fullwidth-stop }
\keys_set:nn { ctex } { punct = kaiming }
% \keys_set:nn { ctex } { punct = kaiming }
},
fullwidth-stop / false .code:n = { }
}
Expand Down Expand Up @@ -2128,7 +2128,7 @@
{
format = \zihao{-3} \normalfont \bfseries,
name = {},
% indent = 2\ccwd,
indent = 1.4em,
number = \__ccnu_arabic:n { chapter },
beforeskip = 5 ex plus 0.5 ex,
afterskip = 2.7 ex plus 0.5 ex,
Expand All @@ -2144,7 +2144,7 @@
{
format = \zihao{-3} \normalfont \bfseries,
name = {},
% indent = 2\ccwd,
indent = 1.4em,
number = \__ccnu_arabic:n { chapter },
beforeskip = 5 ex plus 0.5 ex,
afterskip = 2.7 ex plus 0.5 ex,
Expand All @@ -2164,23 +2164,23 @@
beforeskip = 4.5 ex plus 1.0 ex minus 0.2 ex,
afterskip = 2.7 ex plus 0.5 ex,
fixskip = true,
% indent = 2\ccwd
indent = 2em
},
subsection =
{
format = \zihao{-4} \normalfont \bfseries \raggedright,
beforeskip = 4 ex plus 1.0 ex minus 0.2 ex,
afterskip = 2.5 ex plus 0.3 ex,
fixskip = true,
% indent = 2\ccwd
indent = 3em
},
subsubsection =
{
format = \zihao{-4} \normalfont \bfseries \raggedright,
beforeskip = 1.5 ex plus 0.5 ex minus 0.2 ex,
afterskip = 1.5 ex plus 0.3 ex,
fixskip = true,
% indent = 2\ccwd
indent = 3em
}
}
}
Expand Down Expand Up @@ -2285,7 +2285,7 @@
\tl_set:Nn \l__ccnu_caption_label_seperator_tl
{ colon }
},
caption-labelseperator .initial:n = colon
caption-labelseperator .initial:n = space
}

% 图表 caption 字体
Expand All @@ -2295,8 +2295,16 @@
{ \normalfont \zihao { -5 } }

% 图表 label 和标题之间的分割符
\DeclareCaptionLabelSeparator
{ ccnuspace } { \space \space }
\int_compare:nNnTF { \g__ccnu_thesis_type_int } = {3}
{
\DeclareCaptionLabelSeparator
{ ccnuspace } { \quad }
}
{
\DeclareCaptionLabelSeparator
{ ccnuspace } { \space \space }
}

\captionsetup [ figure ]
{
font = ccnufigurecap,
Expand Down Expand Up @@ -2337,7 +2345,7 @@
\cs_set:Npn \thetable
{ \thechapter . \__ccnu_arabic:n { table } }
},
caption-labelstyle .initial:n = hyphen,
caption-labelstyle .initial:n = dot,
}


Expand Down Expand Up @@ -3838,14 +3846,27 @@
% 时间
\cs_new:Npn \__ccnu_cover_bachelor_time:
{
\node [ anchor = south ] ( date ) at ( current~page~text~area.south )
\bool_if:NTF \g__ccnu_cover_word_version_bool
{
\zihao{3} \bfseries
\zhdigits { \int_use:N \l__ccnu_info_year_int }
\,\,
\zhnumber { \int_use:N \l__ccnu_info_month_int }
\,
};
\node [ anchor = south ] ( date ) at ( current~page~text~area.south )
{
\zihao{3} \bfseries
\zhdigits { \int_use:N \l__ccnu_info_year_int }
\zhnumber { \int_use:N \l__ccnu_info_month_int }
};
}
{
\node [ anchor = south ] ( date ) at ( current~page~text~area.south )
{
\zihao{3} \bfseries
\zhdigits { \int_use:N \l__ccnu_info_year_int }
\,\,
\zhnumber { \int_use:N \l__ccnu_info_month_int }
\,
};
}
}


Expand Down Expand Up @@ -4087,7 +4108,7 @@
\keys_set:nn { ctex }
{
% 目录深度:到 section
tocdepth = 1 ,
tocdepth = 2 ,
% 目录标题
contentsname = \c__ccnu_name_toc_tl,
chapter / tocline =
Expand Down Expand Up @@ -4235,6 +4256,8 @@
\dim_set:Nn \cftchapnumwidth { 1.5em }
\dim_set:Nn \cftsecnumwidth { 2em }
\dim_set:Nn \cftsubsecnumwidth { 2em }
\dim_set:Nn \cftsecindent { 2em }
\dim_set:Nn \cftsubsecindent { 4em }
}
\cs_new:Npn \__ccnu_tableofcontents_format_master:
{
Expand Down Expand Up @@ -4347,8 +4370,6 @@
{ \normalfont \tl_use:N \c__ccnu_name_abstract_tl }
% 「内容摘要:」
{ \bfseries \c__ccnu_name_abstract_tl : }
% 教务处要求缩进两格
\c_space_tl \c_space_tl
}
\cs_new:Npn \__ccnu_abstract_end_bachelor:
{
Expand All @@ -4364,9 +4385,10 @@
\par
}
\textbf { \c__ccnu_name_keywords_tl : }
\c_space_tl \c_space_tl
% \c_space_tl \c_space_tl
\clist_use:Nn \l__ccnu_info_keywords_clist
{ \qquad }
{ ; }
% 结尾的分号
\par
}
\cs_new:Npn \__ccnu_abstract_en_begin_bachelor:
Expand All @@ -4381,7 +4403,13 @@
% 把 Title 写进目录
\addcontentsline { toc } { chapter }
{ \normalfont Title }
\textbf{ Title: } \c_space_tl \l__ccnu_info_title_en_tl \par
\group_begin:
\centering
\bfseries
Title:
\l__ccnu_info_title_en_tl
\par
\group_end:
% \medskip
\phantomsection
\textbf { \c__ccnu_name_abstract_en_tl : }
Expand All @@ -4403,10 +4431,11 @@
{
\par
}
\textbf { \c__ccnu_name_keywords_en_tl : }
\c_space_tl \c_space_tl
\textbf { \c__ccnu_name_keywords_en_tl : ~}
% \c_space_tl \c_space_tl
\clist_use:Nn \l__ccnu_info_keywords_en_clist
{ \qquad }
{ ;~}
; % 结尾的分号
\newpage
}
% 硕博的摘要
Expand Down Expand Up @@ -4649,7 +4678,7 @@
{
backend = biber,
bibstyle = \tl_use:N \l__ccnu_biblatex_bibstyle_tl,
citestyle = gb7714-CCNU
citestyle = gb7714-CCNU,
}
\tl_if_in:NnT \l__ccnu_biblatex_bibstyle_tl { gb7714-CCNU }
{
Expand Down Expand Up @@ -4687,7 +4716,18 @@
\group_begin:
\sloppy
\keys_set:nn { ctex }
{ punct = plain }
{
punct = plain,
chapter =
{
indent = 0pt
}
}
\setlength { \bibitemindent } { 0em }
\setlength { \bibhang } { 2em }
\setlength { \biblabelsep } { 0mm }
\setlength { \biblabelextend } { 0pt }
\linespread { 1.25 } \selectfont
\__ccnu_printbibliography:n { ##1 }
\group_end:
}
Expand Down Expand Up @@ -4916,7 +4956,7 @@
\int_set:Nn \widowpenalty { 10000 }
% 尽量避免在选项中间换行
\int_set:Nn \interlinepenalty { 301 }
\noindent
\noindent \hspace*{-1em}
\dim_set_eq:NN \l__ccnu_choices_total_width_dim \linewidth
\int_zero:N \l__ccnu_choices_columns_int
\dim_zero:N \l__ccnu_choices_label_width_dim
Expand Down Expand Up @@ -5277,4 +5317,23 @@
{
\bool_if:NTF \g__ccnu_blind_version_bool
{ *** } { #1 }
}


\int_compare:nNnT { \g__ccnu_thesis_type_int } = {3}
{
% 来自邓国泰的设置
\setlength { \abovecaptionskip } { 0cm }
\setlength { \belowcaptionskip } { 0cm }
}

\int_compare:nNnT { \g__ccnu_thesis_type_int } = {3}
{
\AddToHook { cmd / backmatter / after }
{
\setlist [enumerate, 1]
{
leftmargin = 2em,
}
}
}
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,29 @@ QQ 1群:435903068(若满了请加2群)
QQ 2群:685329998


## [v1.4.2] - 2024-04-27

除了更新 `CCNUthesis.cls` 还需要修改 `ccnu-setup.tex`
- `caption-labelstyle = dot`
- `caption-labelseperator = space`
注意是改成这两个值。

### Changed
本科模板(主要参考 2024 年教务处模板)

- 修改目录为三级
- 摘要部分关键词增加分号
- 英文标题居中加粗
- 调整正文一到三级标题缩进
- 调整参考文献的 item 缩进
- 调整参考文献标题的缩进
- 调整 `choices` 环境的缩进
- 数院:调整图标的标题与内容的距离(参考邓的设置)





## [v1.4.1] - 2024-04-05

### Added
Expand Down
36 changes: 35 additions & 1 deletion back/appendix.tex
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,40 @@

\chapter{调查问卷}

\begin{enumerate}
\item 我是一个问题题干
\begin{choices}
\item 选项1
\item 选项2
\item 选项3
\item 选项4
\end{choices}
\item 我是一个问题题干
\begin{choices}
\item 选项1
\item 选项2
\item 选项3
\item 选项4
\end{choices}
\end{enumerate}

\begin{enumerate}[(a)]
\item 我是一个问题题干
\begin{choices}
\item 选项1
\item 选项2
\item 选项3
\item 选项4
\end{choices}
\item 我是一个问题题干
\begin{choices}
\item 选项1
\item 选项2
\item 选项3
\item 选项4
\end{choices}
\end{enumerate}

\verb|choices| 环境可以排版 \emph{任意个} 选项,只需要像罗列环境 \verb|enumerate| 环境等一样用 \verb|\item| 分隔即可。

\verb|choices| 环境的 label 可以方便地进行调整
Expand All @@ -17,7 +51,7 @@ \chapter{调查问卷}
\item circlednumber(带圈数字)
\end{itemize}

更多关于 \verb|choices| 环境的精细调整可以查看 \url{https://gitee.com/zepinglee/exam-zh}。
更多关于 \verb|choices| 环境的精细调整可以查看 \url{https://gitee.com/xkwxdyy/exam-zh}。

\begin{choices}[label = \arabic*)]
\item 选项1
Expand Down
14 changes: 1 addition & 13 deletions body/chapter2.tex
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,4 @@ \section{引用参考文献}
\section{链接相关}


模板使用了 hyperref 包处理相关链接,使用 \verb|\href| 可以生成超链接,默认不显示链接颜色。如果需要输出网址,可以使用 \verb|\url| 命令,示例:\url{https://github.com}。


\begin{proof}
\[
x^2
\]
\end{proof}
\begin{proof}
\[
x^2 \qedhere
\]
\end{proof}
模板使用了 hyperref 包处理相关链接,使用 \verb|\href| 可以生成超链接,默认不显示链接颜色。如果需要输出网址,可以使用 \verb|\url| 命令,示例:\url{https://github.com}。
Loading

0 comments on commit d0d0ec8

Please sign in to comment.