Skip to content

Commit

Permalink
Fix invalid cite-style option before natbib loaded (Fix #327)
Browse files Browse the repository at this point in the history
  • Loading branch information
zepinglee committed Mar 7, 2022
1 parent 7c0d710 commit 8bb5897
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- 专业学位类型 `professional-type` 为空时不再显示括号([#325](https://github.com/ustctug/ustcthesis/issues/325))。

# Fixed

- 修复了载入 `natbib` 前设置 `cite-style` 无效的问题([#327](https://github.com/ustctug/ustcthesis/issues/327))。

## [v3.3.1] - 2021-12-10

### Changed
Expand Down
10 changes: 9 additions & 1 deletion ustcthesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -2720,9 +2720,17 @@
\@namedef{bibstyle@ustcthesis-authoryear}{\bibstyle@authoryear}
\@namedef{bibstyle@ustcthesis-bachelor}{\bibstyle@super}
%
% 如果载入 `natbib` 前设置了 `cite-style`,这里先进行配置。
% https://github.com/ustctug/ustcthesis/issues/327
\ifx\ustc@cite@style\@empty\else
\citestyle{\ustc@cite@style}%
\fi
%
% 定义接口 cite-style 切换引用样式。
\ustc@option@hook{cite-style}{%
\citestyle{\ustc@cite@style}%
\ifx\@begindocumenthook\@undefined
\citestyle{\ustc@cite@style}%
\fi
}
%
% 如果文献序号作为叙述文字的一部分,需要临时将文献序号与正文平排
Expand Down

0 comments on commit 8bb5897

Please sign in to comment.