Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

中文参考文献乱序是怎么回事? #70

Closed
xiaoffffff opened this issue Feb 21, 2022 · 14 comments
Closed

中文参考文献乱序是怎么回事? #70

xiaoffffff opened this issue Feb 21, 2022 · 14 comments

Comments

@xiaoffffff
Copy link

cite{乱序,多个文献}引用多个文献时,文中出现的顺序是[2-5,1],或者[5-6,4,3]。怎么样才能在不改变cite里面条目顺序的前提下显示成[1-6]?

@sikouhjw
Copy link

\documentclass[lang=en,a4paper,cite=super]{elegantpaper}
\begin{document}
\cite{article-full,article-minimal,article-crossref}
\nocite{*}
\bibliography{xampl.bib}
\end{document}

请确保你的发行版和模板都是最新版。

@xiaoffffff
Copy link
Author

不好意思啊,我忘记说我用的是中文的模板了,请问中文也可以这样设置吗?

@sikouhjw
Copy link

  1. 跟中英文无关,不影响参考文献行为
  2. cite 的值有关,请阅读手册
  3. 请提供最小工作示例

@xiaoffffff
Copy link
Author

嗯嗯,我再试试,谢谢。

@tbag258
Copy link

tbag258 commented May 23, 2022

嗯嗯,我再试试,谢谢。

请问你解决了吗?

@xiaoffffff
Copy link
Author

没有,我怎么修改也没改过来。你要是改好了,说一下怎么修改的。

@EthanDeng
Copy link
Member

请提供完整示例文件(包含 bib 文件)。

@xiaoffffff
Copy link
Author

xiaoffffff commented May 26, 2022

\documentclass[lang=cn,12pt,a4paper,cite=numbers]{elegantpaper}
\title{工业过程优化}
\author{}
\date{}
\usepackage{array}
\newcommand{\ccr}[1]{\makecell{{\color{#1}\rule{1cm}{1cm}}}}
\usepackage{paralist,cases}
\usepackage[ruled,linesnumbered]{algorithm2e}
\usepackage[misc]{ifsym}
\allowdisplaybreaks[4]
\begin{document}
\maketitle

广义预测控制(Generalized predictive control, GPC)\cite{1987Generalized,clarke1987generalized},模型预测控制(Model predictive control, MPC)的三种基本算法之一。自算法提出到现在,经历几十年的发展后,其在学术和实际应用中都积累了大量的成果\cite{geng1998control,geng1997application,hogg1991multivariable,zhang2010adaptive,clarke1987generalized,bone1995novel},并且与其他智能控制算法相结合\cite{shi2007neural,zhang2010adaptive}。

\bibliography{wprefoptimaldecisionqimo}
\end{document}

这个是bib文件内容,我把内容弄成txt文件了,抱歉github用的不太熟,就这样弄了。

bib.txt

下面这个是我编译出的,文献顺序有点乱,显示的是[3-6,2,7],[8,6]这样。

image

麻烦您了,您抽空可以看下。

@tbag258
Copy link

tbag258 commented May 26, 2022

\documentclass[lang=cn,11pt,a4paper]{elegantpaper}
\ExecuteBibliographyOptions{sorting=none}
\title{论文题目}
...

中间加一句这个就可以了

@xiaoffffff
Copy link
Author

额... 为啥我用这个命令就编译出错了

@EthanDeng
Copy link
Member

用新版的模板,你的代码都是以前的。

\documentclass[lang=cn,12pt,a4paper]{elegantpaper}

\ExecuteBibliographyOptions{sorting=none}


\title{工业过程优化}
\author{}
\date{}
\usepackage{array}
\newcommand{\ccr}[1]{\makecell{{\color{#1}\rule{1cm}{1cm}}}}
\usepackage{paralist,cases}
\usepackage[ruled,linesnumbered]{algorithm2e}
\usepackage[misc]{ifsym}
\allowdisplaybreaks[4]
\begin{document}
\maketitle

广义预测控制(Generalized predictive control, GPC)\cite{1987Generalized,clarke1987generalized},模型预测控制(Model predictive control, MPC)的三种基本算法之一。自算法提出到现在,经历几十年的发展后,其在学术和实际应用中都积累了大量的成果\cite{geng1998control,geng1997application,hogg1991multivariable,zhang2010adaptive,clarke1987generalized,bone1995novel},并且与其他智能控制算法相结合\cite{shi2007neural,zhang2010adaptive}。

\printbibliography[heading=bibintoc, title=\ebibname]

\end{document}

Screen Shot 2022-05-26 at 20 45 22

@EthanDeng
Copy link
Member

对应的文献文件是 reference.bib,新版不是 wpref 了,你把你的 bib.txt 改名为 reference.bib 即可。

@xiaoffffff
Copy link
Author

我的天啊,良心维护啊,感谢感谢感谢,我试试。

@Ovenchan
Copy link

Ovenchan commented Dec 9, 2023

爹!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants