Skip to content

Commit

Permalink
Fix underscore in DOI
Browse files Browse the repository at this point in the history
  • Loading branch information
zepinglee committed Mar 9, 2020
1 parent fe2f439 commit ea96714
Show file tree
Hide file tree
Showing 29 changed files with 59 additions and 56 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- 增加选项 `abbreviate.journal`
- 增加选项 `show.english.translation`

### Fixed
- 修正 DOI 中含有下划线的问题

## [v2.0] - 2020-03-04
### Changed
- 需要用户在主文档使用 `\bibliographystyle` 命令
Expand Down
4 changes: 2 additions & 2 deletions gbt7714-author-year.bst
Original file line number Diff line number Diff line change
Expand Up @@ -2119,9 +2119,9 @@ FUNCTION {begin.bib}
show.doi
{ "\expandafter\ifx\csname href\endcsname\relax"
write$ newline$
" \def\doi#1{#1}\else"
" \providecommand\doi[1]{\nolinkurl{#1}}\else"
write$ newline$
" \def\doi#1{\href{https://doi.org/#1}{#1}}\fi"
" \providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi"
write$ newline$
}
'skip$
Expand Down
4 changes: 2 additions & 2 deletions gbt7714-numerical.bst
Original file line number Diff line number Diff line change
Expand Up @@ -1940,9 +1940,9 @@ FUNCTION {begin.bib}
show.doi
{ "\expandafter\ifx\csname href\endcsname\relax"
write$ newline$
" \def\doi#1{#1}\else"
" \providecommand\doi[1]{\nolinkurl{#1}}\else"
write$ newline$
" \def\doi#1{\href{https://doi.org/#1}{#1}}\fi"
" \providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi"
write$ newline$
}
'skip$
Expand Down
4 changes: 2 additions & 2 deletions gbt7714.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -4130,9 +4130,9 @@ FUNCTION {begin.bib}
show.doi
{ "\expandafter\ifx\csname href\endcsname\relax"
write$ newline$
" \def\doi#1{#1}\else"
" \providecommand\doi[1]{\nolinkurl{#1}}\else"
write$ newline$
" \def\doi#1{\href{https://doi.org/#1}{#1}}\fi"
" \providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi"
write$ newline$
}
'skip$
Expand Down
4 changes: 2 additions & 2 deletions test/testbst/2015-authoryear.bbl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
\expandafter\ifx\csname urlstyle\endcsname\relax\else
\urlstyle{same}\fi
\expandafter\ifx\csname href\endcsname\relax
\def\doi#1{#1}\else
\def\doi#1{\href{https://doi.org/#1}{#1}}\fi
\providecommand\doi[1]{\nolinkurl{#1}}\else
\providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi

\bibitem[刘彻东(1998)]{liuchedong1998zhongguo}
刘彻东, 1998.
Expand Down
4 changes: 2 additions & 2 deletions test/testbst/2015-numerical.bbl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
\expandafter\ifx\csname urlstyle\endcsname\relax\else
\urlstyle{same}\fi
\expandafter\ifx\csname href\endcsname\relax
\def\doi#1{#1}\else
\def\doi#1{\href{https://doi.org/#1}{#1}}\fi
\providecommand\doi[1]{\nolinkurl{#1}}\else
\providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi

\bibitem[陈登原(2000)]{chendengyuan2000guoshijiuwen}
陈登原.
Expand Down
4 changes: 2 additions & 2 deletions test/testbst/npr.bbl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
\expandafter\ifx\csname urlstyle\endcsname\relax\else
\urlstyle{same}\fi
\expandafter\ifx\csname href\endcsname\relax
\def\doi#1{#1}\else
\def\doi#1{\href{https://doi.org/#1}{#1}}\fi
\providecommand\doi[1]{\nolinkurl{#1}}\else
\providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi

\bibitem[陈登原(2000)]{chendengyuan2000guoshijiuwen}
[English translation missing!] (in Chinese) \\
Expand Down
4 changes: 2 additions & 2 deletions test/testbst/option-italicjournal.bbl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
\expandafter\ifx\csname urlstyle\endcsname\relax\else
\urlstyle{same}\fi
\expandafter\ifx\csname href\endcsname\relax
\def\doi#1{#1}\else
\def\doi#1{\href{https://doi.org/#1}{#1}}\fi
\providecommand\doi[1]{\nolinkurl{#1}}\else
\providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi

\bibitem[陈登原(2000)]{chendengyuan2000guoshijiuwen}
陈登原.
Expand Down
4 changes: 2 additions & 2 deletions test/testbst/option-linktitle.bbl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
\expandafter\ifx\csname urlstyle\endcsname\relax\else
\urlstyle{same}\fi
\expandafter\ifx\csname href\endcsname\relax
\def\doi#1{#1}\else
\def\doi#1{\href{https://doi.org/#1}{#1}}\fi
\providecommand\doi[1]{\nolinkurl{#1}}\else
\providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi

\bibitem[陈登原(2000)]{chendengyuan2000guoshijiuwen}
陈登原.
Expand Down
4 changes: 2 additions & 2 deletions test/testbst/option-no-medium-type.bbl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
\expandafter\ifx\csname urlstyle\endcsname\relax\else
\urlstyle{same}\fi
\expandafter\ifx\csname href\endcsname\relax
\def\doi#1{#1}\else
\def\doi#1{\href{https://doi.org/#1}{#1}}\fi
\providecommand\doi[1]{\nolinkurl{#1}}\else
\providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi

\bibitem[陈登原(2000)]{chendengyuan2000guoshijiuwen}
陈登原.
Expand Down
4 changes: 2 additions & 2 deletions test/testbst/option-nomark.bbl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
\expandafter\ifx\csname urlstyle\endcsname\relax\else
\urlstyle{same}\fi
\expandafter\ifx\csname href\endcsname\relax
\def\doi#1{#1}\else
\def\doi#1{\href{https://doi.org/#1}{#1}}\fi
\providecommand\doi[1]{\nolinkurl{#1}}\else
\providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi

\bibitem[陈登原(2000)]{chendengyuan2000guoshijiuwen}
陈登原.
Expand Down
4 changes: 2 additions & 2 deletions test/testbst/option-nosentencase.bbl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
\expandafter\ifx\csname urlstyle\endcsname\relax\else
\urlstyle{same}\fi
\expandafter\ifx\csname href\endcsname\relax
\def\doi#1{#1}\else
\def\doi#1{\href{https://doi.org/#1}{#1}}\fi
\providecommand\doi[1]{\nolinkurl{#1}}\else
\providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi

\bibitem[陈登原(2000)]{chendengyuan2000guoshijiuwen}
陈登原.
Expand Down
4 changes: 2 additions & 2 deletions test/testbst/option-noslash.bbl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
\expandafter\ifx\csname urlstyle\endcsname\relax\else
\urlstyle{same}\fi
\expandafter\ifx\csname href\endcsname\relax
\def\doi#1{#1}\else
\def\doi#1{\href{https://doi.org/#1}{#1}}\fi
\providecommand\doi[1]{\nolinkurl{#1}}\else
\providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi

\bibitem[陈登原(2000)]{chendengyuan2000guoshijiuwen}
陈登原.
Expand Down
4 changes: 2 additions & 2 deletions test/testbst/option-noslsn.bbl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
\expandafter\ifx\csname urlstyle\endcsname\relax\else
\urlstyle{same}\fi
\expandafter\ifx\csname href\endcsname\relax
\def\doi#1{#1}\else
\def\doi#1{\href{https://doi.org/#1}{#1}}\fi
\providecommand\doi[1]{\nolinkurl{#1}}\else
\providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi

\bibitem[陈登原(2000)]{chendengyuan2000guoshijiuwen}
陈登原.
Expand Down
4 changes: 2 additions & 2 deletions test/testbst/option-nouppercase.bbl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
\expandafter\ifx\csname urlstyle\endcsname\relax\else
\urlstyle{same}\fi
\expandafter\ifx\csname href\endcsname\relax
\def\doi#1{#1}\else
\def\doi#1{\href{https://doi.org/#1}{#1}}\fi
\providecommand\doi[1]{\nolinkurl{#1}}\else
\providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi

\bibitem[陈登原(2000)]{chendengyuan2000guoshijiuwen}
陈登原.
Expand Down
4 changes: 2 additions & 2 deletions test/testbst/option-nourl.bbl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
\expandafter\ifx\csname urlstyle\endcsname\relax\else
\urlstyle{same}\fi
\expandafter\ifx\csname href\endcsname\relax
\def\doi#1{#1}\else
\def\doi#1{\href{https://doi.org/#1}{#1}}\fi
\providecommand\doi[1]{\nolinkurl{#1}}\else
\providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi

\bibitem[陈登原(2000)]{chendengyuan2000guoshijiuwen}
陈登原.
Expand Down
4 changes: 2 additions & 2 deletions test/testbst/option-only-start-page.bbl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
\expandafter\ifx\csname urlstyle\endcsname\relax\else
\urlstyle{same}\fi
\expandafter\ifx\csname href\endcsname\relax
\def\doi#1{#1}\else
\def\doi#1{\href{https://doi.org/#1}{#1}}\fi
\providecommand\doi[1]{\nolinkurl{#1}}\else
\providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi

\bibitem[陈登原(2000)]{chendengyuan2000guoshijiuwen}
陈登原.
Expand Down
4 changes: 2 additions & 2 deletions test/testbst/ustc-authoryear.bbl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
\expandafter\ifx\csname urlstyle\endcsname\relax\else
\urlstyle{same}\fi
\expandafter\ifx\csname href\endcsname\relax
\def\doi#1{#1}\else
\def\doi#1{\href{https://doi.org/#1}{#1}}\fi
\providecommand\doi[1]{\nolinkurl{#1}}\else
\providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi

\bibitem[刘彻东(1998)]{liuchedong1998zhongguo}
刘彻东. 1998.
Expand Down
4 changes: 2 additions & 2 deletions test/testbst/ustc-bachelor.bbl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
\expandafter\ifx\csname urlstyle\endcsname\relax\else
\urlstyle{same}\fi
\expandafter\ifx\csname href\endcsname\relax
\def\doi#1{#1}\else
\def\doi#1{\href{https://doi.org/#1}{#1}}\fi
\providecommand\doi[1]{\nolinkurl{#1}}\else
\providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi

\bibitem[陈登原(2000)]{chendengyuan2000guoshijiuwen}
陈登原.
Expand Down
4 changes: 2 additions & 2 deletions test/testbst/ustc-numerical.bbl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
\expandafter\ifx\csname urlstyle\endcsname\relax\else
\urlstyle{same}\fi
\expandafter\ifx\csname href\endcsname\relax
\def\doi#1{#1}\else
\def\doi#1{\href{https://doi.org/#1}{#1}}\fi
\providecommand\doi[1]{\nolinkurl{#1}}\else
\providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi

\bibitem[陈登原(2000)]{chendengyuan2000guoshijiuwen}
陈登原.
Expand Down
4 changes: 2 additions & 2 deletions variants/2005/gbt7714-2005-author-year.bst
Original file line number Diff line number Diff line change
Expand Up @@ -2119,9 +2119,9 @@ FUNCTION {begin.bib}
show.doi
{ "\expandafter\ifx\csname href\endcsname\relax"
write$ newline$
" \def\doi#1{#1}\else"
" \providecommand\doi[1]{\nolinkurl{#1}}\else"
write$ newline$
" \def\doi#1{\href{https://doi.org/#1}{#1}}\fi"
" \providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi"
write$ newline$
}
'skip$
Expand Down
4 changes: 2 additions & 2 deletions variants/2005/gbt7714-2005-numerical.bst
Original file line number Diff line number Diff line change
Expand Up @@ -1940,9 +1940,9 @@ FUNCTION {begin.bib}
show.doi
{ "\expandafter\ifx\csname href\endcsname\relax"
write$ newline$
" \def\doi#1{#1}\else"
" \providecommand\doi[1]{\nolinkurl{#1}}\else"
write$ newline$
" \def\doi#1{\href{https://doi.org/#1}{#1}}\fi"
" \providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi"
write$ newline$
}
'skip$
Expand Down
4 changes: 2 additions & 2 deletions variants/npr/npr.bst
Original file line number Diff line number Diff line change
Expand Up @@ -1980,9 +1980,9 @@ FUNCTION {begin.bib}
show.doi
{ "\expandafter\ifx\csname href\endcsname\relax"
write$ newline$
" \def\doi#1{#1}\else"
" \providecommand\doi[1]{\nolinkurl{#1}}\else"
write$ newline$
" \def\doi#1{\href{https://doi.org/#1}{#1}}\fi"
" \providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi"
write$ newline$
}
'skip$
Expand Down
4 changes: 2 additions & 2 deletions variants/thu/thuthesis-author-year.bst
Original file line number Diff line number Diff line change
Expand Up @@ -2133,9 +2133,9 @@ FUNCTION {begin.bib}
show.doi
{ "\expandafter\ifx\csname href\endcsname\relax"
write$ newline$
" \def\doi#1{#1}\else"
" \providecommand\doi[1]{\nolinkurl{#1}}\else"
write$ newline$
" \def\doi#1{\href{https://doi.org/#1}{#1}}\fi"
" \providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi"
write$ newline$
}
'skip$
Expand Down
4 changes: 2 additions & 2 deletions variants/thu/thuthesis-bachelor.bst
Original file line number Diff line number Diff line change
Expand Up @@ -1940,9 +1940,9 @@ FUNCTION {begin.bib}
show.doi
{ "\expandafter\ifx\csname href\endcsname\relax"
write$ newline$
" \def\doi#1{#1}\else"
" \providecommand\doi[1]{\nolinkurl{#1}}\else"
write$ newline$
" \def\doi#1{\href{https://doi.org/#1}{#1}}\fi"
" \providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi"
write$ newline$
}
'skip$
Expand Down
4 changes: 2 additions & 2 deletions variants/thu/thuthesis-numeric.bst
Original file line number Diff line number Diff line change
Expand Up @@ -1954,9 +1954,9 @@ FUNCTION {begin.bib}
show.doi
{ "\expandafter\ifx\csname href\endcsname\relax"
write$ newline$
" \def\doi#1{#1}\else"
" \providecommand\doi[1]{\nolinkurl{#1}}\else"
write$ newline$
" \def\doi#1{\href{https://doi.org/#1}{#1}}\fi"
" \providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi"
write$ newline$
}
'skip$
Expand Down
4 changes: 2 additions & 2 deletions variants/ustc/ustcthesis-authoryear.bst
Original file line number Diff line number Diff line change
Expand Up @@ -2119,9 +2119,9 @@ FUNCTION {begin.bib}
show.doi
{ "\expandafter\ifx\csname href\endcsname\relax"
write$ newline$
" \def\doi#1{#1}\else"
" \providecommand\doi[1]{\nolinkurl{#1}}\else"
write$ newline$
" \def\doi#1{\href{https://doi.org/#1}{#1}}\fi"
" \providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi"
write$ newline$
}
'skip$
Expand Down
4 changes: 2 additions & 2 deletions variants/ustc/ustcthesis-bachelor.bst
Original file line number Diff line number Diff line change
Expand Up @@ -1942,9 +1942,9 @@ FUNCTION {begin.bib}
show.doi
{ "\expandafter\ifx\csname href\endcsname\relax"
write$ newline$
" \def\doi#1{#1}\else"
" \providecommand\doi[1]{\nolinkurl{#1}}\else"
write$ newline$
" \def\doi#1{\href{https://doi.org/#1}{#1}}\fi"
" \providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi"
write$ newline$
}
'skip$
Expand Down
4 changes: 2 additions & 2 deletions variants/ustc/ustcthesis-numerical.bst
Original file line number Diff line number Diff line change
Expand Up @@ -1940,9 +1940,9 @@ FUNCTION {begin.bib}
show.doi
{ "\expandafter\ifx\csname href\endcsname\relax"
write$ newline$
" \def\doi#1{#1}\else"
" \providecommand\doi[1]{\nolinkurl{#1}}\else"
write$ newline$
" \def\doi#1{\href{https://doi.org/#1}{#1}}\fi"
" \providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi"
write$ newline$
}
'skip$
Expand Down

0 comments on commit ea96714

Please sign in to comment.