zepinglee / gbt7714-bibtex-style

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

引用顺序问题 #147

Closed mengzhu0308 closed 6 months ago

mengzhu0308 commented 7 months ago

编译环境

宏包版本:gbt7714 v1.0 标注样式:super / numbers

描述问题

希望文献按引用顺序编号,即下列文献在论文的引用编号应为[1],但是编译的结果是[5]

bib 数据库代码:

@article{McCulloch_1934_LogicalCalculus,
 author = {McCulloch, W. S. and Pitts, W.},
 doi = {10.1007/BF02478259},
 journal = {The Bulletin of Mathematical Biophysics},
 number = {4},
 pages = {115-133},
 title = {A Logical Calculus of the Ideas Immanent in Nervous Activity},
 volume = {5},
 year = {1943}
}

截图:

mengzhu0308 commented 7 months ago

此处改正一下:宏包版本:gbt7714 v2.0

mengzhu0308 commented 7 months ago

请问这个问题该如何解决呀?

mengzhu0308 commented 7 months ago

论文中也是按照readme的要求这样写的: \usepackage{gbt7714} \bibliographystyle{gbt7714-numerical}

sikouhjw commented 7 months ago

编译方式:latexmk -pdf

\begin{filecontents*}{\jobname.bib}
@article{McCulloch_1934_LogicalCalculus,
  author  = {McCulloch, W. S. and Pitts, W.},
  doi     = {10.1007/BF02478259},
  journal = {The Bulletin of Mathematical Biophysics},
  number  = {4},
  pages   = {115-133},
  title   = {A Logical Calculus of the Ideas Immanent in Nervous Activity},
  volume  = {5},
  year    = {1943}
 }
\end{filecontents*}

\documentclass{article}
\usepackage{gbt7714}
\bibliographystyle{gbt7714-numerical}
\begin{document}
\cite{McCulloch_1934_LogicalCalculus}
\bibliography{\jobname.bib}
\end{document}

图片

mengzhu0308 commented 7 months ago

谢谢回复,但是我改为latexmk编译会报错,只能用xelate编译。

mengzhu0308 commented 7 months ago

我的设置如下,因为是中文,所以选用了xeLaTex: image

mengzhu0308 commented 7 months ago

我的文件类是这个: \documentclass[ hyperref,% 标签和超链接,放在这里,防止乱码。 UTF-8,% 指明编码文档时使用的编码格式。 a4paper,% openany,% oneside,% no-math,% AutoFakeBold,% 中文字体加粗。 zihao=-4,% fontset=windows,% linespread=1.39]{ctexbook} % ctex*文档类会自动调用fontspec宏包、xeCJK宏包等。

zepinglee commented 7 months ago

无法复现你的问题。这个 numeric 样式默认就是按照引用顺序的。

可能是你的引用出现在了目录中,被误认为是先引用的。建议检查 [1] 号引用的位置,并给出可复现问题的代码。

mengzhu0308 commented 7 months ago

谢谢您的回复。我仔细检查了,应该没有在目录中出现引用。后面,我是这样解决的。先通过latexmk编译生成.bbl文件,然后用xelatex编译,并删除除.bbl之外的辅助生成文件,文献顺序正常引用了。

mengzhu0308 commented 7 months ago

用latexmk编译,文献顺序引用,但\setCJKmainfont{SimSun} % 设置中文字体为宋体 \setmainfont{Times New Roman} % 设置英文字体为Times New Roman会报错,用xelatex编译,文献无法顺序引用,但不会报错,所以取巧各自编译了一下。

zepinglee commented 7 months ago

用latexmk编译,文献顺序引用,但\setCJKmainfont{SimSun} % 设置中文字体为宋体 \setmainfont{Times New Roman} % 设置英文字体为Times New Roman会报错,用xelatex编译,文献无法顺序引用,但不会报错,所以取巧各自编译了一下。

你描述的情况非常奇怪。建议给出完整的 MRE.

mengzhu0308 commented 7 months ago

好的,稍等一会儿。

mengzhu0308 commented 7 months ago

我刚才仔细检查了一下,确实提前出现在目录中了

mengzhu0308 commented 7 months ago

image

mengzhu0308 commented 7 months ago

意思是说,我应该解决的是插图目录中提前出现文献引用怎么办?

mengzhu0308 commented 7 months ago

意思是,各种目录应该最后生成,从而保证引用顺序。

mengzhu0308 commented 7 months ago

谢谢您的回复和帮助呀!

zepinglee commented 7 months ago

一种是使用 notoccite,另一种是 \section[]{} 的方括号中去掉 \cite 重写一遍。

mengzhu0308 commented 7 months ago

收到!