我正在测试一个模板。它在 OS X 上使用 MacTex2019 时运行良好,但在 Windows 和 Unix 上使用 texlive2020 时出错。发生了什么?
错误:
\RequirePackage[sort&compress,numbers]{natbib}
\RequirePackage[sort&compress]{gbt7714}
\RequirePackage{hypernat}
登录OSX:
...
(/usr/local/texlive/2019/texmf-dist/tex/latex/natbib/natbib.sty)
(/usr/local/texlive/2019/texmf-dist/tex/latex/gbt7714/gbt7714.sty
(/usr/local/texlive/2019/texmf-dist/tex/latex/etoolbox/etoolbox.sty))
(/usr/local/texlive/2019/texmf-dist/tex/latex/hypernat/hypernat.sty)
(/usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/hypcap.sty)
(/usr/local/texlive/2019/texmf-dist/tex/latex/footmisc/footmisc.sty)
...
登录 Windows:
...
(c:/texlive/2020/texmf-dist/tex/latex/natbib/natbib.sty)
(c:/texlive/2020/texmf-dist/tex/latex/gbt7714/gbt7714.sty
! LaTeX Error: Option clash for package natbib.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.63 \RequirePackage
{url}
?
登录Unix:
(/usr/local/texlive/2020/texmf-dist/tex/latex/natbib/natbib.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/gbt7714/gbt7714.sty
! LaTeX Error: Option clash for package natbib.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.63 \RequirePackage
{url}
?
注释掉之后\RequirePackage[sort&compress]{gbt7714}
,可以编译成功,但引用不正确,并且没有参考章节。