Skip to content

Commit

Permalink
增加了 bib-keyval 键值,用于接入 biblatex 的键值
Browse files Browse the repository at this point in the history
  • Loading branch information
xkwxdyy committed Feb 22, 2024
1 parent 45449e4 commit eb02a04
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
17 changes: 10 additions & 7 deletions CCNUthesis.cls
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
\ProvidesExplClass {CCNUthesis} {2024-01-18} {v1.2.19}
\ProvidesExplClass {CCNUthesis} {2024-02-22} {v1.2.20}
{Thesis template for Central China Normal University}
\RequirePackage { l3keys2e, xparse }

Expand Down Expand Up @@ -4442,14 +4442,13 @@
\RequirePackage { biblatex }
\__ccnu_biblatex_post_setup:
}

\clist_if_exist:NF \l__ccnu_biblatex_options_clist
{
\clist_new:N \l__ccnu_biblatex_options_clist
}
\cs_new_protected:Npn \__ccnu_biblatex_pre_setup:
{
\cs_undefine:N \addbibresource
\clist_if_exist:NF \l__ccnu_biblatex_options_clist
{
\clist_new:N \l__ccnu_biblatex_options_clist
}
\clist_put_right:Nn \l__ccnu_biblatex_options_clist
{ hyperref = manual }
\clist_put_right:Nn \l__ccnu_biblatex_options_clist
Expand Down Expand Up @@ -4534,7 +4533,11 @@
{
\tl_set_eq:NN \l__ccnu_biblatex_bibstyle_tl \l_keys_value_tl
},
bib-resource .clist_set:N = \l__ccnu_bib_resource_clist
bib-resource .clist_set:N = \l__ccnu_bib_resource_clist,
bib-keyval .code:n =
{
\clist_put_right:Nn \l__ccnu_biblatex_options_clist {#1}
}
}
\keys_set:nn { ccnu / style }
{
Expand Down
6 changes: 6 additions & 0 deletions ccnu-setup.tex
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,12 @@
% 注意:需要加 bib 后缀
% 默认:CCNUthesis-main.bib
%
% bib-keyval = {doi=false},
% biblatex 宏包的键值接口
% 适用学位类型:【本|硕|博】
% 具体可输入选项请参考 biblatex-gb7714-2015 宏包文档(命令行输入 `texdoc biblatex-gb7714-2015`)
% 比如 doi=false 表示不显示 doi
%
hyperlink = none,
% 超链接样式
% 可选选项:color|none
Expand Down
7 changes: 7 additions & 0 deletions doc/body/usage.tex
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,13 @@ \subsubsection{论文格式} \label{subsubsec:论文格式}
【本|硕|博】参考文献数据源。可以是单个文件,也可以是用英文逗号隔开的一组文件。\emph{必须明确给出 \file{.bib} 后缀名}。默认为 \file{CCNUthesis-main.bib}。
\end{function}

\begin{function}[added = 2024-02-22]{style/bib-keyval}
\begin{ccnusyntax}[emph={[1]bib-keyval}]
bib-keyval = (*\marg{键值对}*)
\end{ccnusyntax}
【本|硕|博】用于接入 \pkg{biblatex} 宏包的选项,内容为键值对,键值对之间用西文逗号隔开。比如 |bib-keyval={doi=false}| 表示去掉参考文献中的 DOI 信息。 具体可输入的选项请参考 \pkg{biblatex-gb7714-2015} 宏包的文档(命令行输入 |texdoc biblatex-gb7714-2015|)。
\end{function}



\subsubsection{信息录入} \label{subsubsec:信息录入}
Expand Down

0 comments on commit eb02a04

Please sign in to comment.