zepinglee / gbt7714-bibtex-style

GB/T 7714-2015 BibTeX Style
LaTeX Project Public License v1.3c
1.17k stars 196 forks source link

Tex Live 2020中编译错误,在2019中正常 #58

Closed kevinleeex closed 4 years ago

kevinleeex commented 4 years ago

编译环境

宏包版本:gbt7714 v2.0.1 标注样式:numerical

使用了natbib,并指定[sort&compress]

描述问题

您好,请问该宏包是否存在兼容问题,在Tex Live 2020中,无法直接编译通过。

出现以下错误:

c:/texlive/2020/texmf-dist/tex/latex/gbt7714/gbt7714.sty:63: LaTeX Error: Option clash for package natbib.

bib 数据库代码:

@article{曹敏GB,
  title={GB/T 7714-2015《信息与文献  参考文献著录规则》标准解析},
  author={曹敏},
  journal={科技与出版},
  number={9},
  pages={47-50}
}

@article{陈浩元2015gb,
  title={GB/T 7714 新标准对旧标准的主要修改及实施要点提示},
  author={陈浩元},
  journal={编辑学报},
  volume={27},
  number={4},
  pages={339--343},
  year={2015}
}

截图: Package epstopdf Warning: Drivers other than pdftex' andluatex' are not supported.

)) (c:/texlive/2020/texmf-dist/tex/latex/tocloft/tocloft.sty) (c:/texlive/2020/texmf-dist/tex/latex/tocbibind/tocbibind.sty

Package tocbibind Note: Using chapter style headings, unless overridden.

) (c:/texlive/2020/texmf-dist/tex/latex/natbib/natbib.sty) (c:/texlive/2020/texmf-dist/tex/latex/gbt7714/gbt7714.sty

c:/texlive/2020/texmf-dist/tex/latex/gbt7714/gbt7714.sty:63: LaTeX Error: Option clash for package natbib.

zepinglee commented 4 years ago

使用了 natbib,并指定[sort&compress]

gbt7714 会调用 natbib

\RequirePackage[compress]{natbib}

所以再次 \usepackage[sort&compress]{natbib} 会造成 Option clash。

正确的做法是

`\usepackage[sort&compress]{gbt7714}`

这样 sort&compress 会传递给 natbib

另外更新 v2.x 后才会出现这个问题,是因为调用 natbib 的默认参数从 sort&compress 换成了 compress,见 #47 。

kevinleeex commented 4 years ago

谢谢,问题已解决,才发现MacTex 2019使用的是1.x版本。