论文参考文献生成代码(2021.2.25)

时间:2021-2-27 作者:admin

生成指定标准形式的参考文献2021.2.25

1、前言

        众多学者和研究人员在撰写论文或修改论文时,他们都不可避免地要对参考文献进行整理、编号和排序,其实在整个过程中,论文的排版并不费时,而在参考文献的整理上会占用太多时间。绝大多数学者可能会选择使用引用管理软件来管理论文后面的参看文献,但仍有少数研究人员可能更倾向于与自己查找引用来组织文后参考文献格式(原因在于他们不太愿意使用引用管理软件,或许是懒得安装,或许是软件不太友好等等)。
        目前来说,常用的引用管理软件包括:NoteExpressEndNoteNoteFirstProCite, RefWorksZoteroJabRefBibDesk 等。然而,本人目前为止也仅使用过EndNote和NoteExpress而已,后来也卸载不用了。

2、参考文献引用格式及标准(以一篇论文为例说明)

        在各大学术平台导出文献的引用格式以Plain TextBibTeXRIS为主。其中Plain Text作为纯文本简单易懂,这里不做介绍。

2.1 实例论文导出引用格式文件

        下面以这篇论文Determination of water quality assessment in wells of the Göksu Plains using multivariate statistical techniques为例,说明文献导出引用的过程。
论文参考文献生成代码(2021.2.25)

论文参考文献生成代码(2021.2.25)
论文参考文献生成代码(2021.2.25)
到此,Taylor Francis Online官网给出的引用如下:
Esra Deniz Güner, Hatice Oncel Cekim & Galip Seçkin (2021) Determination of water quality assessment in wells of the Göksu Plains using multivariate statistical techniques, Environmental Forensics, 22:1-2, 172-188, DOI: 10.1080/15275922.2020.1834025
        可能官网导出的引用与我们期望的标准有所差异,那么需要从Taylor Francis Online官网导出文献对应的BibTex格式和RIS格式文件及内容,然后根据内容按照相应的标准补齐并修正参考文献引用即可。
论文参考文献生成代码(2021.2.25)

2.1.1 BibTeX文件(.bib)

        Bib TeX格式对应的.bib文件介绍
论文参考文献生成代码(2021.2.25)
论文参考文献生成代码(2021.2.25)
        实例文件bib.bib
论文参考文献生成代码(2021.2.25)

@article{doi:10.1080/15275922.2020.1834025,
author = {Esra Deniz Güner and Hatice Oncel Cekim and Galip Seçkin},
title = {Determination of water quality assessment in wells of the Göksu Plains using multivariate statistical techniques},
journal = {Environmental Forensics},
volume = {22},
number = {1-2},
pages = {172-188},
year  = {2021},
publisher = {Taylor & Francis},
doi = {10.1080/15275922.2020.1834025},

URL = { 
        https://doi.org/10.1080/15275922.2020.1834025
    
},
eprint = { 
        https://doi.org/10.1080/15275922.2020.1834025
    
}

}

2.1.2 RIS文件(.ris)

        RIS格式对应的.ris文件介绍
论文参考文献生成代码(2021.2.25)
论文参考文献生成代码(2021.2.25)

TY  - JOUR
T1  - Determination of water quality assessment in wells of the Göksu Plains using multivariate statistical techniques
AU  - Güner, Esra Deniz
AU  - Cekim, Hatice Oncel
AU  - Seçkin, Galip
Y1  - 2021/04/03
PY  - 2021
DA  - 2021/04/03
N1  - doi: 10.1080/15275922.2020.1834025
DO  - 10.1080/15275922.2020.1834025
T2  - Environmental Forensics
JF  - Environmental Forensics
JO  - null
SP  - 172
EP  - 188
VL  - 22
IS  - 1-2
PB  - Taylor & Francis
SN  - 1527-5922
M3  - doi: 10.1080/15275922.2020.1834025
UR  - https://doi.org/10.1080/15275922.2020.1834025
ER  - 
0

2.2 参考文献引用三大标准

        当前通用的参考文献引用标准主要包括三种:GB/T 7714-2015MLAAPA

2.2.1 GB/T 7714-2015

        GB/T 7714-2015标准
        GB/T 7714-2015标准文件下载
论文参考文献生成代码(2021.2.25)
Determination of water quality assessment in wells of the Göksu Plains using multivariate statistical techniques[J]. Environmental Forensics, 2021, 22(1-2) : 172-188.

2.2.2 MLA

        MLA官网
论文参考文献生成代码(2021.2.25)
论文参考文献生成代码(2021.2.25)
“Determination of water quality assessment in wells of the Göksu Plains using multivariate statistical techniques”. Environmental Forensics 22.1-2(2021): 172-188.

2.2.3 APA

        APA格式官网
论文参考文献生成代码(2021.2.25)

论文参考文献生成代码(2021.2.25)

(2021). Determination of water quality assessment in wells of the Göksu Plains using multivariate statistical techniques. Environmental Forensics, 22(1-2), pp. 172-188.

3、用学术搜索平台导出各种标准的引用

3.1 百度学术

论文参考文献生成代码(2021.2.25)
        百度学术导出的三种引用标准:
论文参考文献生成代码(2021.2.25)

3.2 谷歌学术

论文参考文献生成代码(2021.2.25)
        谷歌学术导出的三种引用标准:
论文参考文献生成代码(2021.2.25)

3.3 中国知网

论文参考文献生成代码(2021.2.25)
论文参考文献生成代码(2021.2.25)
        知网导出引用的三种标准:
论文参考文献生成代码(2021.2.25)
论文参考文献生成代码(2021.2.25)
论文参考文献生成代码(2021.2.25)

3.4 万方

论文参考文献生成代码(2021.2.25)
万方导出引用格式(由于万方数据库检索不到上述论文,以其他论文为例):
        BibTeX格式
论文参考文献生成代码(2021.2.25)
论文参考文献生成代码(2021.2.25)
论文参考文献生成代码(2021.2.25)
论文参考文献生成代码(2021.2.25)
论文参考文献生成代码(2021.2.25)
        GB/T 7714-2015标准
论文参考文献生成代码(2021.2.25)
        万方支持的自定义格式比较友好,支持用户选择想要的格式,前提得能在万方数据库中检索到所需文献才能使用。
论文参考文献生成代码(2021.2.25)

3.5 ResearchGate

论文参考文献生成代码(2021.2.25)
        ResearchGate导出的引用格式(RIS、Bib TeX和Plain Text):
论文参考文献生成代码(2021.2.25)
        ResearchGate导出的RIS如下:

TY  - JOUR
AU  - Güner, Esra Deniz
AU  - Cekim, Hatice
AU  - Seçkin, Galip
PY  - 2020/11/17
SP  - 1
EP  - 17
T1  - Determination of water quality assessment in wells of the Göksu Plains using multivariate statistical techniques
VL  - 22
DO  - 10.1080/15275922.2020.1834025
JO  - Environmental Forensics
ER  - 

论文参考文献生成代码(2021.2.25)
        ResearchGate导出的Bib TeX如下:

@article{article,
author = {Güner, Esra Deniz and Cekim, Hatice and Seçkin, Galip},
year = {2020},
month = {11},
pages = {1-17},
title = {Determination of water quality assessment in wells of the Göksu Plains using multivariate statistical techniques},
volume = {22},
journal = {Environmental Forensics},
doi = {10.1080/15275922.2020.1834025}
}

论文参考文献生成代码(2021.2.25)
        ResearchGate导出的Plain Text如下:

Güner, Esra Deniz & Cekim, Hatice & Seçkin, Galip. (2020). Determination of water quality assessment in wells of the Göksu Plains using multivariate statistical techniques. Environmental Forensics. 22. 1-17. 10.1080/15275922.2020.1834025. 

3.6 ScienceDirect

论文参考文献生成代码(2021.2.25)
        ScienceDirect可以导出RIS和Bib TeX引用格式。

4、编写文后参考文献引用的解决方案

        方式一:可以通过百度学术或者谷歌学术导出文献的引用,对于引用中不全的内容或者格式不对的内容进行修改,若论文的页码不全需要下载全文进行补全即可。
        方式二:利用ResearchGate或文献来源期刊网站导出BibTeX文件或RIS文件或Plain Text纯文本文件,这三种文件都可以用记事本Notepad打开查看
        在方式二中,我们可以对导出的BibTeX文件或RIS文件进行读取,使用流行编程语言(如C++、Java、Python、C#、VB、Matlab等)来将作者、期刊名称或会议名称、论文类型、论文标题、发表年份、卷号、期号和页码范围等字段进行解析,然后只需将这些字符串按照所需的指定标准有序进行字符串连接即可,当然支持生成批量参考文献引用最好。
        遍历文件夹读取.ris或.bib格式的导出文献获得参考文献引用的Python代码

import os
#os.walk方法获取当前路径下的root(所有路径)、dirs(所有子文件夹)、files(所有文件)

Standard1 = "GB/T 7714-2015"  # 三大参考文献引用标准
# Esra Deniz Güner, Cekim H O , Sekin G . Determination of water quality assessment in wells of the Gksu Plains using multivariate statistical techniques[J]. Environmental Forensics, 2020(5):1-17.
Standard2 = "MLA"
# Esra Deniz Güner, H. O. Cekim , and G. Sekin . "Determination of water quality assessment in wells of the Gksu Plains using multivariate statistical techniques." Environmental Forensics 5(2020):1-17.
Standard3 = "APA"
# Esra Deniz Güner, Cekim, H. O. , & Sekin, G. . (2020). Determination of water quality assessment in wells of the gksu plains using multivariate statistical techniques. Environmental Forensics(5), 1-17.

mystandard = "GB/T 7714-2015" #自己所需的文献引用标准
path = "d:\\搜狗高速下载\\Exportcitatioin"
filename = "" #读取参考文献的txt
for root, dirs, files in os.walk(path):
    for file in files:
        #print file.decode('gbk')    #文件名中有中文字符时转码
        if os.path.splitext(file)[1] == '.ris' or os.path.splitext(file)[1] == '.bib':
            filename = path +"\\"+ os.path.splitext(file)[0]+os.path.splitext(file)[1]
            cankaowenxian = ""
            fopen = open(filename, 'r')
            lines = fopen.readlines()
            if (".ris" in filename):
                # RIS格式
                TY = ""  # 期刊类型
                T1 = ""  # 标题
                AU = ""  # 第一作者
                PY = ""  # 发表日期
                DO = ""  # 论文的doi号
                JO = ""  # 期刊名称
                SP = ""  # 起始页码
                EP = ""  # 终止页码
                VL = ""  # 卷号
                IS = ""  # 期号
                tempauthorcount = 0
                authorcount = 0
                for line in lines:
                    if ("AU" in line):
                        authorcount = authorcount + 1  # 先统计作者的数目
                for line in lines:
                    if ("TY" in line):
                        TY = line[6:].rstrip('\n')
                    elif ("T1" in line):
                        T1 = line[6:].rstrip('\n')
                    elif ("AU" in line):
                        if AU != '':
                            if tempauthorcount == authorcount - 1:
                                AU += " and "
                            else:
                                AU += ", "
                        AU += line[6:].rstrip('\n')
                        tempauthorcount = tempauthorcount + 1
                    elif ("JO" in line):
                            JO = line[6:].rstrip('\n')
                    elif ("PY" in line):
                        PY = line[6:].rstrip('\n')
                    elif ("VL" in line):
                        VL = line[6:].rstrip('\n')
                    elif ("IS" in line):
                        IS = line[6:].rstrip('\n')
                    elif ("SP" in line):
                        SP = line[6:].rstrip('\n')
                    elif ("EP" in line):
                        EP = line[6:].rstrip('\n')
                    elif ("DO" in line):
                        DO = line[22:].rstrip('\n')
                if mystandard == Standard1 and TY == 'JOUR':
                    cankaowenxian = AU + ". " + T1 + "[J]. " + JO + ", " + PY + ", " + VL + "(" + IS + "):" + SP + "-" + EP + "." + "(doi:" + DO + ")"  # 期刊导出的引用格式
                elif mystandard == Standard2:
                    cankaowenxian = AU + ". \"" + T1 + ".\" " + JO + " " + VL + "." + IS + "(" + PY + "): " + SP + "-" + EP + "." + "(doi:" + DO + ")"  # 期刊导出的引用格式
                elif mystandard == Standard3:
                    cankaowenxian = AU + ". " + PY + ". " + T1 + ". " + JO + ", " + VL + "(" + IS + "), " + SP + "-" + EP + "." + "(doi:" + DO + ")"  # 期刊导出的引用格式
            elif (".bib" in filename):
                # Bib TeX格式
                author = ""  # 作者
                title = ""  # 标题
                journal = ""  # 期刊名称
                volume = ""  # 卷号
                number = ""  # 期号
                pages = ""  # 页码范围
                year = ""  # 发表年份
                publisher = ""
                doi = ""  # 论文的doi号
                for line in lines:
                    if ("author" in line):
                        authortemp = line[line.find('{') + 1:line.find('}')].rstrip('\n')
                        authortemp = authortemp.split('and')  # 作者字符串数组
                        i = 0
                        for temp in authortemp:
                            if (i == 0):
                                author += temp
                            elif i == len(authortemp) - 1 and len(authortemp) == 3:
                                author += 'and' + temp
                            elif (i == 3):
                                author += ', et al'
                                break
                            else:
                                author += ',' + temp
                            i = i + 1
                    elif ("title" in line):
                        title = line[line.find('{') + 1:line.find('}')].rstrip('\n')
                    elif ("journal" in line):
                        journal = line[line.find('{') + 1:line.find('}')].rstrip('\n')
                    elif ("volume" in line):
                        volume = line[line.find('{') + 1:line.find('}')].rstrip('\n')
                    elif ("number" in line):
                        number = line[line.find('{') + 1:line.find('}')].rstrip('\n')
                    elif ("pages" in line):
                        pages = line[line.find('{') + 1:line.find('}')].rstrip('\n')
                    elif ("year" in line):
                        year = line[line.find('{') + 1:line.find('}')].rstrip('\n')
                    elif ("publisher" in line):
                        publisher = line[line.find('{') + 1:line.find('}')].rstrip('\n')
                    elif ("doi" in line):
                        doi = line[line.find('{') + 1:line.find('}')].rstrip('\n')
                if mystandard == Standard1:
                    cankaowenxian = author + ". " + title + "[J]. " + journal + ", " + year + ", " + volume + "(" + number + "):" + pages + ".(" + "doi:" + doi + ")"  # 期刊导出的引用格式
                elif mystandard == Standard2:
                    cankaowenxian = author + ". \"" + title + ".\" " + journal + " " + volume + "." + number + "(" + year + "): " + pages + ".(" + "doi:" + doi + ")"  # 期刊导出的引用格式
                elif mystandard == Standard3:
                    cankaowenxian = author + ". " + year + ". " + title + ". " + journal + ", " + volume + "(" + number + "), " + pages + ".(" + "doi:" + doi + ")"  # 期刊导出的引用格式
            print("读取" + filename + "结束!")
            print(cankaowenxian)

用代码读取以下文件夹中所有的.ris和.bib格式文件,每篇文献组成引用打印出来。
论文参考文献生成代码(2021.2.25)

        PyCharm中运行结果
论文参考文献生成代码(2021.2.25)

        引用标准为GB/T 7714-2015的控制台打印结果:

读取d:\搜狗高速下载\Exportcitatioin\S2090123220300540.bib结束!
Muhammad Adnan Shereen , Suliman Khan , Abeer Kazmi , et al. COVID-19 infection: Origin, transmission, and characteristics of human coronaviruses[J]. Journal of Advanced Research, 2020, 24()91-98.(doi:https://doi.org/10.1016/j.jare.2020.03.005)
读取d:\搜狗高速下载\Exportcitatioin\S2090123220300540.ris结束!
Shereen, Muhammad Adnan, Khan, Suliman, Kazmi, Abeer, Bashir, Nadia and Siddique, Rabeea. COVID-19 infection: Origin, transmission, and characteristics of human coronaviruses[J]. Journal of Advanced Research, 2020, 24()91-98.(doi:10.1016/j.jare.2020.03.005)
读取d:\搜狗高速下载\Exportcitatioin\tandf_uenf2022_172.bib结束!
Esra Deniz G眉ner , Hatice Oncel Cekim and Galip Se莽kin. Determination of water quality assessment in wells of the G枚ksu Plains using multivariate statistical techniques[J]. Environmental Forensics, 2021, 22(1-2)172-188.(doi:        https://doi.org/10.1080/15275922.2020.1834025)
读取d:\搜狗高速下载\Exportcitatioin\tandf_uenf2022_172.ris结束!
G眉ner, Esra Deniz, Cekim, Hatice Oncel and Se莽kin, Galip. Determination of water quality assessment in wells of the G枚ksu Plains using multivariate statistical techniques[J]. null, 2021, 22(1-2)172-188.(doi:.2020.1834025)

        引用标准为MLA的控制台打印结果:

读取d:\搜狗高速下载\Exportcitatioin\S2090123220300540.bib结束!
Muhammad Adnan Shereen , Suliman Khan , Abeer Kazmi , et al. "COVID-19 infection: Origin, transmission, and characteristics of human coronaviruses." Journal of Advanced Research 24.(2020): 91-98.(doi:https://doi.org/10.1016/j.jare.2020.03.005)
读取d:\搜狗高速下载\Exportcitatioin\S2090123220300540.ris结束!
Shereen, Muhammad Adnan, Khan, Suliman, Kazmi, Abeer, Bashir, Nadia and Siddique, Rabeea. "COVID-19 infection: Origin, transmission, and characteristics of human coronaviruses." Journal of Advanced Research 24.(2020): 91-98.(doi:10.1016/j.jare.2020.03.005)
读取d:\搜狗高速下载\Exportcitatioin\tandf_uenf2022_172.bib结束!
Esra Deniz G眉ner , Hatice Oncel Cekim and Galip Se莽kin. "Determination of water quality assessment in wells of the G枚ksu Plains using multivariate statistical techniques." Environmental Forensics 22.1-2(2021): 172-188.(doi:        https://doi.org/10.1080/15275922.2020.1834025)
读取d:\搜狗高速下载\Exportcitatioin\tandf_uenf2022_172.ris结束!
G眉ner, Esra Deniz, Cekim, Hatice Oncel and Se莽kin, Galip. "Determination of water quality assessment in wells of the G枚ksu Plains using multivariate statistical techniques." null 22.1-2(2021): 172-188.(doi:.2020.1834025)

        引用标准为APA的控制台打印结果:

读取d:\搜狗高速下载\Exportcitatioin\S2090123220300540.bib结束!
Muhammad Adnan Shereen , Suliman Khan , Abeer Kazmi , et al. 2020. COVID-19 infection: Origin, transmission, and characteristics of human coronaviruses. Journal of Advanced Research, 24(), 91-98.(doi:https://doi.org/10.1016/j.jare.2020.03.005)
读取d:\搜狗高速下载\Exportcitatioin\S2090123220300540.ris结束!
Shereen, Muhammad Adnan, Khan, Suliman, Kazmi, Abeer, Bashir, Nadia and Siddique, Rabeea. 2020. COVID-19 infection: Origin, transmission, and characteristics of human coronaviruses. Journal of Advanced Research, 24(), 91-98.(doi:10.1016/j.jare.2020.03.005)
读取d:\搜狗高速下载\Exportcitatioin\tandf_uenf2022_172.bib结束!
Esra Deniz G眉ner , Hatice Oncel Cekim and Galip Se莽kin. 2021. Determination of water quality assessment in wells of the G枚ksu Plains using multivariate statistical techniques. Environmental Forensics, 22(1-2), 172-188.(doi:        https://doi.org/10.1080/15275922.2020.1834025)
读取d:\搜狗高速下载\Exportcitatioin\tandf_uenf2022_172.ris结束!
G眉ner, Esra Deniz, Cekim, Hatice Oncel and Se莽kin, Galip. 2021. Determination of water quality assessment in wells of the G枚ksu Plains using multivariate statistical techniques. null, 22(1-2), 172-188.(doi:.2020.1834025)

5、word文档中参考文献排序小tip

        如下图所示,这里演示如何将这些参考文献按照首字母升序排序:(参考在 Word 中按字母顺序对列表进行排序
论文参考文献生成代码(2021.2.25)
        在word的开始菜单下找到排序,在排序窗口中选择主要关键字为段落数,类型选择拼音,勾选升序后点击确定即可。
论文参考文献生成代码(2021.2.25)
论文参考文献生成代码(2021.2.25)
论文参考文献生成代码(2021.2.25)

6 总结

        总的来说,可能有的学者觉得手动整理参考文献的引用特别耗时费力,但引用管理软件也不是万能的,准确率也有待提高 ,所以尽量自己能够利用编程工具解析参考文献的导出文件来生成引用,这样能够保证参考文献引用的正确性和规范性,毕竟自己动手、丰衣足食嘛!

声明:本文内容由互联网用户自发贡献自行上传,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任。如果您发现有涉嫌版权的内容,欢迎进行举报,并提供相关证据,工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。