美文网首页
一文搞定bib参考文献

一文搞定bib参考文献

作者: Neural_PDE | 来源:发表于2019-06-20 21:08 被阅读0次

    首先,如果你是纯小白,先花1分钟预习一下

    想高亮显示
    \textbf{内容}
    

    一、pdf中展示不同格式

    1使用现成的\bibliographystyle{style.bst}

    下载bibstyle.bst样式风格文件到你的latex作品文件夹,之后选择其中一种运行在你的Latex中即可,例如:

    \bibliographystyle{model1-num-names}
    

    上面的为展示效果为:P. Dirac, title, Physica 19 (1953) 888–896.
    如下是全部样式使用方法(建议全部粘贴到你的tex开头部分)如果无法运行 尝试在报错行去掉尾部空格

    %\biboptions{square,numbers,sort&compress}
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%  LaTeX 标准选项及其样式共有以下8种风格: %%%%%%%%%%%%%%%%
    %\usepackage{natbib}
    %\bibliographystyle{acm}
    %plain,按字母的顺序排列,比较次序为作者、年度和标题.
    %unsrt,样式同plain,只是按照引用的先后排序.
    %alpha,用作者名首字母+年份后两位作标号,以字母顺序排序.
    %abbrv,类似plain,将月份全拼改为缩写,更显紧凑.
    %ieeetr,国际电气电子工程师协会期刊样式.
    %acm,美国计算机学会期刊样式.
    %siam,美国工业和应用数学学会期刊样式.
    %apalike,美国心理学学会期刊样式.
    
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%%%    Elesver      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %\bibliographystyle{model1-num-names}%正常名P. Dirac, title, Physica 19 (1953) 888–896.
    %\bibliographystyle{elsarticle-num}%正常名P. Dirac, title, Physica 19 (1-–12) (1953) 888–896. doi:10.10
    %\bibliographystyle{elsarticle-num}%正常名P. Dirac, title, Physica 19 (1-–12) (1953) 888–896. doi:10.10
    %\bibliographystyle{elsarticle-num-names}%正常名P. Dirac, title, Physica 19 (1953) 888–896. doi:10.10
    %\bibliographystyle{model1a-num-names}%正常名,无标题P. Dirac, Physica 19 (1953) 888–896. doi:10.10
    %\bibliographystyle{model2-names.bst}\biboptions{authoryear}%反常逗号名Dirac, P., 1953. Title. Physica 19, 888–896. doi:10.10
    %\bibliographystyle{model5-names}\biboptions{authoryear}%反常逗号名Dirac, P. (1953). title. 斜体Physica, 斜体19, 888–896. doi:10.10
    %\bibliographystyle{elsarticle-harv}%反常逗号名Dirac, P., 1953. title. Physica 19, 888–896. doi:10.10
    %\usepackage{amssymb}\bibliographystyle{model6-num-names}%反常逗号名Dirac, P.. Title. 斜体Physica 1953;19(1-–12):888–896. doi:10.10
    %\usepackage{numcompress}\bibliographystyle{model3-num-names}%反常名Dirac P. Title. Physica 1953;19(1-–12):888–96. doi:10.1016
    %\usepackage{numcompress}\bibliographystyle{model4-names}\biboptions{authoryear}%反常名Dirac P. title. Physica 1953;19(1-–12):888–96.doi:10.1
    %\bibliographystyle{unsrt}%全称名P.A.M. Dirac. title. 斜体Physica, 19(1-–12):888–896, 1953.
    %\bibliographystyle{plainnat}%全称名P.A.M. Dirac. title. 斜体Physica, 19(1-–12):888–896, 1953. doi: 10.10
    
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%%%%    Springer    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \usepackage[numbers]{natbib}%显示引用为标号【1】
    \bibliographystyle{spbasic}
    %\bibliographystyle{spmpsci}
    %\bibliographystyle{spphys}
    %\bibliographystyle{spr-mp-sola}
    
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%%%%    IEEE Tran    %%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %\bibliographystyle{IEEEtranN}
    %\bibliographystyle{IEEEtranS}
    %\bibliographystyle{IEEEtranSA}
    %\bibliographystyle{IEEEtranSN}
    

    还可以使用natbib.sty,教程
    还有springer的模板和bib
    结尾处插入如下命令:

    \section*{Reference}
    \bibliography{ref}
    

    其余问题:
    1文献title需要大写怎么办:加个大括号

    title = {Newpaper {T}ilele},
    

    2如何去掉doi?答:前面加个 #

    # doi = {10.1016/j.camwa.2019.02.035}
    

    2自己制作

    虽然BibTex Style 式样丰富、种类繁多,但有时还是会需要制作自己的。.bst虽然是文本文件,但由于其语法比较底层,读起来比较吃力,相关文献也非常少,因此直接修改.bst虽然是最为自由可控的方法,但并不推荐。比较好的方式是使用makebst。它以命令行对话的方式交互式地让用户对引文格式的各个方面进行选择。
    安装好CTEX后按照如下路径

    CTEX\MiKTeX\tex\latex\custom-bib
    

    打开

    makebst
    

    得到如下内容

    ***********************************
    * This is Make Bibliography Style *
    ***********************************
    It makes up a docstrip batch job to produce
    a customized .bst file for running with BibTeX
    Do you want a description of the usage? (NO)
    
    yn=
    

    这时便开始进行对话。键入“y”会显示帮助,键入“n”或直接回车会直接进入格式指定的过程。在此过程中,程序会提许多问题,包括引文如何编号

    STYLE OF CITATIONS:
    (*) Numerical as in standard LaTeX
    (a) Author-year with some non-standard interface
    (b) Alpha style, Jon90 or JWB90 for single or multiple authors
    (o) Alpha style, Jon90 even for multiple authors
    (f) Alpha style, Jones90 (full name of first author)
    (c) Cite key (special for listing contents of bib file)
     Select:
    

    如何排序

    ORDERING OF REFERENCES (if non-author/year and non-alph)
    (*) Alphabetical by all authors
    (c) Citation order (unsorted, like unsrt.bst)
    (d) Year ordered and then by authors
    (r) Reverse year ordered and then by authors
     Select:
    

    作者姓名如何显示

    AUTHOR NAMES:
    (*) Full, surname last (John Frederick Smith)
    (f) Full, surname first (Smith, John Frederick)
    (i) Initials + surname (J. F. Smith)
    (r) Surname + initials (Smith, J. F.)
    (s) Surname + dotless initials (Smith J F)
    (w) Surname + comma + spaceless initials (Smith, J.F.)
    (x) Surname + pure initials (Smith JF)
    (y) Surname + comma + pure initials (Smith, JF)
    (z) Surname + spaceless initials (Smith J.F.)
    (a) Only first name reversed, initials (AGU style: Smith, J. F., H. K. Jones)
    (b) First name reversed, with full names (Smith, John Fred, Harry Kab Jones)
     Select:
    

    日期格式

    DATE FORMAT (if non author-year citations)
    (*) Plain month and year without any brackets
    (p) Date in parentheses as (May 1993)
    (b) Date in brackets as [May 1993]
    (c) Date preceded by colon as `: May 1993'
    (d) Date preceded by period as `. May 1993'
    (m) Date preceded by comma as `, May 1993'
    (s) Date preceded by space only, as ` May 1993'
     Select:
    

    等等。这些选项,对于一般的自定制要求来说足够了。

     在所有问题回答完毕之后,会出现如下提示:
    
    Finished!!
    Batch job written to file `tmp.dbj'
    Shall I now run this batch job? (NO)
    
    yn=
    

    这时选“y”程序便会处理方才的选择,生成两个文件,后缀分别是bst和dbj。这个bst文件已经可以使用。

     dbj文件中记录了上面所有问题的选择,如果需要进行微小的改动,可以直接在这个文件中找到对应的部分,注释掉不需要的选项,将需要的选项解除注释,然后运行
    
    latex xxx.dbj
    

    便会生成一个新的以该文件底部指定的名称为名的bst文件。

     可能希望让BibTex能够找到新的bst文件,这时,需要将其拷贝到MikTex的local目录中,比如(Win7)
    
    c:Users(当前用户名)AppDataLocalMiKTeX2.9bibtexbst
    

    然后在命令行运行

    texhash
    

    即可。

    本文转自:http://www.douban.com/note/148832303/

    二、使用LabRef管理(当然,你也可以选择写字板打开方式来管理你的.bib文件,那么可以跳过此步骤)

    1下载LabRef来管理你的文件

    LabRef界面.png
    2汉化
    3最重要的一点它可以一键缩写期刊名称(我暂时主要利用它的这个功能),或者关联PDF(在LabRef中选择一篇文献条目,右键超链接即可)

    相关文章

      网友评论

          本文标题:一文搞定bib参考文献

          本文链接:https://www.haomeiwen.com/subject/lydsqctx.html