Skip to content

Commit

Permalink
Add support for \noopsort
Browse files Browse the repository at this point in the history
  • Loading branch information
zepinglee committed Apr 27, 2024
1 parent 3505928 commit 0b1ae2c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## Added

- 新增对 `\noopsort` 的支持,与 `xampl.bib` 兼容([CTeX-org/forum#315](https://github.com/CTeX-org/forum/issues/315))。

## [v2.1.6] - 2024-03-08

## Added
Expand Down
9 changes: 9 additions & 0 deletions gbt7714.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,15 @@
% \end{macrocode}
% \end{environment}
%
% Patch \pkg{natbib} 内部命令,以支持 \cs{noopsort}。
% 参考 \url{https://tex.stackexchange.com/a/39718/82731}。
% \begin{macrocode}
\let\NAT@bare@aux\NAT@bare
\def\NAT@bare#1(#2){%
\begingroup\edef\x{\endgroup
\unexpanded{\NAT@bare@aux#1}(\@firstofone#2)}\x}
% \end{macrocode}
%
% \begin{macro}{\url}
% 使用 \pkg{xurl} 宏包的方法,增加 URL 可断行的位置。
% \begin{macrocode}
Expand Down
4 changes: 4 additions & 0 deletions gbt7714.sty
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@
\if*#2*\else\textsuperscript{#2}\fi
\fi}{#1}{#2}}
\renewcommand\@biblabel[1]{[#1]\hfill}
\let\NAT@bare@aux\NAT@bare
\def\NAT@bare#1(#2){%
\begingroup\edef\x{\endgroup
\unexpanded{\NAT@bare@aux#1}(\@firstofone#2)}\x}
\g@addto@macro\UrlBreaks{%
\do0\do1\do2\do3\do4\do5\do6\do7\do8\do9%
\do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M
Expand Down

0 comments on commit 0b1ae2c

Please sign in to comment.