将 bibtex 添加到 xelatex 报告文档

将 bibtex 添加到 xelatex 报告文档

今天要交论文了,好久没睡觉了。我试着用 bib 文件添加参考书目。在网上的教程里,我用 endnote 制作了 useref.txt,然后在 tex 文件中写了这些:

\documentclass[12pt,a4paper,BCOR=.7cm,headsepline,bibliography=totoc]{report}
\usepackage[numbers,sort&compress]{natbib}
...
...
...
\bibliographystyle{plainnat}
\bibliography{useref}

但是当我跑的时候Xelatex+MakeIndex+Bibtex

我得到Sorry, but "MiKTeX Compiler Driver" did not succeed. textify.log 说明

2022-03-13 13:10:12,718+0330 INFO  texify.core - start process: miktex-bibtex.exe thesis
2022-03-13 13:10:13,064+0330 FATAL texify.core - BibTeX failed for some reason.
2022-03-13 13:10:13,065+0330 FATAL texify.core - Data: 
2022-03-13 13:10:13,065+0330 FATAL texify.core - Source: Programs\MiKTeX\texify\mcd.cpp:1331
2022-03-13 13:10:13,070+0330 FATAL texify - BibTeX failed for some reason.
2022-03-13 13:10:13,070+0330 FATAL texify - Info: 
2022-03-13 13:10:13,070+0330 FATAL texify - Source: Programs\MiKTeX\texify\mcd.cpp
2022-03-13 13:10:13,070+0330 FATAL texify - Line: 1331

我知道这可能是一个重复的问题,但我不知道哪里出了问题。请帮帮我!这是我的完整代码

答案1

先说一句:如果你在网上看到的教程声称可以使用.txtbib 文件的扩展名,那么你应该立即停止使用该教程。要使用 BibTeX,文件扩展名必须.bib没有例外。

当我尝试通过 XeLaTeX 然后通过 BibTeX 运行以下程序来生成测试书目时:

% !TEX TS-program = xelatex
\documentclass[12pt,a4paper,BCOR=.7cm,headsepline,bibliography=totoc]{report}
\usepackage[numbers]{natbib} % "sort&compress" option doen't work if there is no 'author' or 'key' field.
\bibliographystyle{plainnat}
\usepackage{xurl} % <-- for typesetting contents of 'url' fields

\begin{document}
\nocite{*}
\bibliography{useref}  % filename extension _must_ be .bib, not .txt
\end{document}

BibTeX 在遇到 233 个 [!!] 语法错误后崩溃。对于仅包含 52 个条目的参考书目来说还不错...


一些最严重的错误与author字段有关。例如,

   author = {Alex Graves, Greg Wayne, Malcolm Reynolds, Tim Harley, 
   Ivo Danihelka, Agnieszka Grabska-Barwińska, Sergio Gómez Colmenarejo, 
   Edward Grefenstette, Tiago Ramalho, John Agapiou, 
   Adrià Puigdomènech Badia, Karl Moritz Hermann, Yori Zwols, 
   Georg Ostrovski, Adam Cain, Helen King, Christopher Summerfield, 
   Phil Blunsom, Koray Kavukcuoglu & Demis Hassabis },

完全错误。BibTeX 使用关键字and来分隔 中的作者author field。使用,;&作为分隔符是一个简单的错误。正确的作者字段应该是

   author = {Alex Graves and Greg Wayne and Malcolm Reynolds and Tim Harley and 
   Ivo Danihelka and Agnieszka Grabska-Barwińska and Sergio Gómez Colmenarejo and 
   Edward Grefenstette and Tiago Ramalho and John Agapiou and
   Adrià Puigdomènech Badia and Karl Moritz Hermann and Yori Zwols and 
   Georg Ostrovski and Adam Cain and Helen King and Christopher Summerfield and 
   Phil Blunsom and Koray Kavukcuoglu and Demis Hassabis},

同样,你必须更换

   author = {Ramachandran, Prajit; Parmar, Niki; Vaswani, Ashish; 
   Bello, Irwan; Levskaya, Anselm; Shlens, Jonathon},

   author = {Ramachandran, Prajit and Parmar, Niki and Vaswani, Ashish and 
   Bello, Irwan and Levskaya, Anselm and Shlens, Jonathon},

此外,在该字段中使用“et al.”author也不合适。请替换

   author = {Guohui Chuai, Qi Liu et al.},

   author = {Guohui Chuai and Qi Liu and others},

这里,others是一个用来表示截断列表的关键字。


第二个严重的语法错误涉及以下行

url = {https://www.youtube.com/watch?v=jAhjPd4uNFY\&t=122s}{\url{https://www.youtube.com/watch?v=jAhjPd4uNFY\&t=122s},

不是“escape” &;而是加载xurl包。正确的字段应该是

url = {https://www.youtube.com/watch?v=jAhjPd4uNFY&t=122s},

然后有一个问题,很多条目——准确地说是 20 个——是丢失的作者字段。这很糟糕,因为plainnat参考书目样式按字母顺序对所有条目进行排序。我无法帮助您填充相应的author字段。

最后,BibTeX 还会发出大量警告消息,因为您似乎将@article条目类型用作默认条目类型。请注意,该@article类型应专门用于在学术期刊上发表的文章。在plainnatbib 样式中,@article条目类型有四种必需的字段:、、author和。我建议您对所有明显不是期刊文章的条目使用。titlejournalyear@misc



以下useref.bib文件的删节版本——再次提醒,请注意扩展名的使用.bib——不应产生任何错误消息。请尽量消除导致警告消息的问题。

@misc{RN29,
   title = {All you need about {CRISPR}},
   url = {https://www.addgene.org/guides/crispr/},
   type = {Web Page}
}
@misc{RN26,
   title = {{CHOPCHOP} v3: expanding the {CRISPR} web toolbox beyond genome editing},
   type = {Journal Article}
}
@misc{RN28,
   title = {{CHOPCHOP}: a {CRISPR/Cas9} and {TALEN} web tool for genome editing},
   type = {Journal Article}
}
@misc{RN44,
   title = {CRISPR},
   volume = {2022},
   number = {01/12},
   url = {https://en.wikipedia.org/wiki/CRISPR},
   type = {Web Page}
}
@misc{RN31,
   title = {{DNA}},
   volume = {2022},
   number = {01/14},
   url = {https://en.wikipedia.org/wiki/DNA},
   type = {Web Page}
}
@misc{RN35,
   title = {First genetically modified animal},
   volume = {2022},
   number = {10/16},
   url = {https://www.pnas.org/content/71/4/1250?tab=author-info},
   type = {Web Page}
}
@misc{RN36,
   title = {First {GM} patent},
   volume = {2022},
   number = {01/16},
   url = {https://patents.google.com/patent/US4259444},
   type = {Web Page}
}
@misc{RN49,
   title = {Genetic Engineering Will Change Everything Forever---{CRISPR}},
   volume = {2022},
   number = {01/14},
   url = {https://www.youtube.com/watch?v=jAhjPd4uNFY&t=122s},
   type = {Web Page}
}
@misc{RN42,
   title = {Glowing fish},
   volume = {2022},
   number = {01/16},
   url = {https://www.glofish.com},
   type = {Web Page}
}
@misc{RN39,
   title = {{GMOs}},
   volume = {2022},
   number = {01/16},
   url = {https://th.schattauer.de/contents/archive/issue/721/manuscript/9641.html},
   type = {Web Page}
}
@misc{RN30,
   title = {Good Overview by {Wired}},
   url = {https://www.wired.com/2015/07/crispr-dna-editing-2/},
   type = {Web Page}
}
@misc{RN47,
   title = {{HIV} Genes Have Been Cut Out of Live Animals Using {CRISPR}},
   volume = {2022},
   number = {01/16},
   url = {https://time.com/4340722/hiv-removed-using-crispr/},
   type = {Web Page}
}
@misc{RN34,
   title = {Inserting {DNA} snippets into organisms},
   volume = {2022},
   number = {01/16},
   url = {http://www.genomenewsnetwork.org/resources/timeline/1977_Gilbert.php},
   type = {Web Page}
}
@misc{RN1,
   title = {{ParsiLaTeX}},
   url = {http://parsilatex.com/site/},
   type = {Multimedia Application}
}
@misc{RN33,
   title = {Radiation research},
   url = {https://www.amusingplanet.com/2013/03/atomic-gardening-breeding-plants-with.html},
   type = {Journal Article},
}
@misc{RN2,
   title = {Selective Breeding},
   volume = {2022},
   number = {01/12},
   url = {https://en.wikipedia.org/wiki/Plant_breeding},
   type = {Web Page}
}
@misc{RN32,
   title = {Understanding {DNA}},
   volume = {2022},
   number = {01/14},
   url = {https://medlineplus.gov/genetics/understanding/basics/dna/},
   type = {Web Page}
}
@misc{RN53,
   title = {{Gene SnipperTM Cas9 Nickase (H840A)}},
   url = {https://www.biovision.com/documentation/datasheets/M1098.pdf},
   year = {2016},
   type = {Chart or Table}
}
@misc{RN50,
   title = {Building Blocks of the Genetic Code},
   url = {https://www.ashg.org/discover-genetics/building-blocks/},
   year = {2019},
   type = {Chart or Table}
}
@misc{RN52,
   title = {What is the Difference Between {ZFN TALEN} and {CRISPR}},
   url = {https://www.differencebetween.com/what-is-the-difference-between-zfn-talen-and-crispr/},
   year = {2021},
   type = {Chart or Table}
}
@article{RN12,
   author = {Alex Graves and Greg Wayne and Malcolm Reynolds and Tim Harley and Ivo Danihelka and Agnieszka Grabska-Barwińska and Sergio Gómez Colmenarejo and Edward Grefenstette and Tiago Ramalho and John Agapiou and Adrià Puigdomènech Badia and Karl Moritz Hermann and Yori Zwols and Georg Ostrovski and Adam Cain and Helen King and Christopher Summerfield and Phil Blunsom and Koray Kavukcuoglu and Demis Hassabis },
   title = {Hybrid computing using a neural network with dynamic external memory},
   journal = {Nature},
   volume = 538,
   number = 7626,
   pages = { 471–476},
   DOI = {10.1038/nature20101},
   year = {2016},
   type = {Journal Article}
}
@misc{RN51,
   author = {Allison, Hilary},
   title = {The Differences Between {DNA} and {RNA}},
   url = {https://www.thoughtco.com/dna-versus-rna-608191},
   year = {2020},
   type = {Chart or Table}
}
@misc{RN3,
   author = {Doudna, Jennifer},
   title = {{TED} Talk},
   month = sep,
   year = {2015},
   type = {Podcast}
}
@misc{RN23,
   author = {Florian Heigwer and Grainne Kerr and Michael Boutros},
   title = {{E-CRISP}: fast {CRISPR} target site identification },
   type = {Journal Article}
}
@misc{RN40,
   author = {G. Bruening and J. M. Lyons},
   title = {The case of the {FLAVR SAVR} tomato},
   url = {https://calag.ucanr.edu/Archive/?article=ca.v054n04p6},
   year = {2000},
   type = {Web Page}
}
@misc{RN21,
   author = {Guohui Chuai and Qi Liu and others},
   title = {{DeepCRISPR}: optimized {CRISPR} guide {RNA} design by deep learning},
   year = {2018},
   type = {Journal Article}
}
 @inproceedings{RN10,
    author="Blockeel, Hendrik",
    editor="Sammut, Claude and Webb, Geoffrey I.",
    title ="Hypothesis Space",
    booktitle="Encyclopedia of Machine Learning",
    year  ="2010",
    publisher="Springer",
    address="Boston, MA",
    pages={511--513},
    doi  ={10.1007/978-0-387-30164-8_373},
    url  ={https://doi.org/10.1007/978-0-387-30164-8_373}
 }
@article{RN4,
   author = {Ishino, Y. and Shinagawa, H. and Makino, K. and Amemura, M. and Nakata, A.},
   title = {Nucleotide sequence of the iap gene, responsible for alkaline phosphatase isozyme conversion in {Escherichia} coli, and identification of the gene product},
   journal = {Journal of Bacteriology},
   volume = {169},
   pages = {5429–5433},
   year = {1987},
   type = {Journal Article}
}
@inproceedings{RN15,
   author = {Jaegle, Andrew and Gimeno, Felix and Brock, Andrew and Zisserman, Andrew and Vinyals, Oriol and Carreira, Joao},
   title = {Perceiver: General Perception with Iterative Attention},
   booktitle={Proceedings of the 38th International Conference on Machine Learning},
   year = {2021},
   xtype = {Journal Article}
}
@article{RN22,
   author = {Jean-Paul Concordet and Maximilian H{\"a}ussler},
   title = {{CRISPOR}: intuitive guide selection for {CRISPR/Cas9} genome editing experiments and screens},
   journal = {Nucleic Acids Research},
   volume = {46},
   number = {W1},
   pages = {W242--W245},
   DOI = {10.1093/nar/gky354},
   type = {Journal Article}
}
@article{RN24,
   author = {Jeongbin Park and Sangsu Bae and Jin-Soo Kim},
   title = {{Cas-Designer}: a web-based tool for choice of {CRISPR-Cas9} target sites},
   journal = {Bioinformatics},
   DOI = {10.1093/bioinformatics/btv537},
   type = {Journal Article}
}
@article{RN37,
   author = {Johnson, I. S.},
   title = {Human insulin from recombinant {DNA} technology},
   journal = {Science},
   DOI = {10.1126/science.6337396},
   url = {https://pubmed.ncbi.nlm.nih.gov/6337396/},
   year = {1983},
   type = {Journal Article}
}
@book{RN41,
   author = {Knoepfler, Paul},
   title = {{GMO Sapiens}: The Life-Changing Science of Designer Babies},
   DOI = {10.1142/9542 },
   url = {https://www.worldscientific.com/worldscibooks/10.1142/9542},
   year = {2015},
   type = {Book}
}
@misc{RN27,
   author = {Kornel Labun and Tessa G. Montague and James A. Gagnon and Summer B. Thyme and Eivind Valen},
   title = {{CHOPCHOP v2}: a web tool for the next generation of {CRISPR} genome engineering},
   type = {Journal Article}
}
@article{RN19,
   author = {Labuhn, M. and Adams, F. F. and Ng, M. and Knoess, S. and Schambach, A. and Charpentier, E. M. and Heckl, D.},
   title = {Refined {sgRNA} efficacy prediction improves large- and small-scale {CRISPR–Cas9} applications},
   journal = {Nucleic Acids Research},
   DOI = {10.1093/nar/gkx1268},
   year = {2017},
   type = {Journal Article}
}
@misc{RN11,
   author = {Lecun, Yann},
   title = {Deep Learning course at {NYU}, video lecture Week 6},
   year = {2020},
   type = {Online Multimedia}
}
@article{RN43,
   author = {Ledford, Heidi},
   title = {{CRISPR}: gene editing is just the beginning},
   journal = {Nature},
   volume = {531},
   pages = {156–159},
   url = {http://go.nature.com/24Nhykm},
   year = {2016},
   type = {Journal Article}
}
@article{RN45,
   author  = {Ledford, Heidi},
   title   = {{HIV} cut from cells and rats with {CRISPR}},
   journal = {Nature},
   volume  = {531},
   pages   = {156--159},
   url     = {https://www.nature.com/articles/531156a},
   year    = {2016},
   type = {Journal Article}
}
@article{RN5,
   author = {Mojica, F.J. and Juez, G. and Rodriguez-Valera, F.},
   title = {Transcription at different salinities of {Haloferax} mediterranei sequences adjacent to partially modified {PstI} sites},
   journal = {Molecular Microbiology},
   volume = {9},
   pages = {613–621},
   year = {1993},
   type = {Journal Article}
}
@article{RN7,
   author = {Opitz, D. and Maclin, R.},
   title = {Popular ensemble methods: An empirical study},
   journal = {Journal of Artificial Intelligence Research},
   volume = {11},
   pages = {169–198},
   DOI = {10.1613/jair.614},
   year = {1999},
   type = {Journal Article}
}
@article{RN6,
   author = {Patrick D. Hsu and Eric S. Lander and Feng Zhang},
   title = {Development and Applications of {CRISPR-Cas9} for Genome Engineering},
   xxvolume = {4.1.3},
   journal = {Cell},
   volume  = 157,
   number  = 6, 
   pages   = {1262-1278},
   year = {2014},
   type = {Web Page}
}
@article{RN8,
   author = {Polikar, R.},
   title = {Ensemble based systems in decision making},
   journal = {IEEE Circuits and Systems Magazine},
   volume = 6,
   number = 3,
   pages = {21–45},
   DOI = {10.1109/MCAS.2006.1688199},
   year = {2006},
   type = {Journal Article}
}
@article{RN46,
   author = {Rafal Kaminski and Yilan Chen and Tracy Fischer and Ellen Tedaldi and Alessandro Napoli and Yonggang Zhang and Jonathan Karn and Wenhui Hu and Kamel Khalili},
   title = {Elimination of {HIV-1} Genomes from Human {T}-lymphoid Cells by {CRISPR/Cas9} Gene Editing},
   journal = {Scientific Reports},
   volume = {6},
   url = {https://www.nature.com/articles/srep22555},
   year = {2016},
   type = {Journal Article}
}
@misc{RN14,
   author = {Ramachandran, Prajit and Parmar, Niki and Vaswani, Ashish and Bello, Irwan and Levskaya, Anselm and Shlens, Jonathon},
   title = {Stand-Alone Self-Attention in Vision Models},
   year = {2019},
   type = {Journal Article}
}
@article{RN16,
   author = {Ray, Tiernan},
   title = {Google's Supermodel: {DeepMind} Perceiver is a step on the road to an {AI} machine that could process anything and everything},
   journal = {ZDNet},
   year = {2021},
   type = {Journal Article}
}
@article{RN48,
   author = {Reardon, Sara},
   title = {First {CRISPR} clinical trial gets green light from {US} panel},
   journal = {Nature},
   url = {https://www.nature.com/articles/nature.2016.20137},
   year = {2016},
   type = {Journal Article}
}
@article{RN9,
   author = {Rokach, L.},
   title = {Ensemble-based classifiers},
   journal = {Artificial Intelligence Review},
   volume = {33},
   pages = {1–39},
   DOI = {10.1007/s10462-009-9124-7},
   year = {2010},
   type = {Journal Article}
}
@article{RN25,
   author = {Sangsu Bae and Jeongbin Park and Jin-Soo Kim},
   title = {{Cas-OFFinder}: a fast and versatile algorithm that searches for potential off-target sites of {Cas9 RNA-guided} endonucleases},
   journal = {bioinformatics},
   DOI = {10.1093/bioinformatics/btu048},
   type = {Journal Article}
}
@article{RN18,
   author = {Stemmer, M. and Thumberger, T. and del Sol Keyer, M. and Wittbrodt, J. and Mateo, J.L.},
   title = {{CCTop}: an intuitive, flexible and reliable {CRISPR/Cas9} target prediction tool},
   journal = {PLOS One},
   DOI = {10.1371/journal.pone.0124633},
   year = {2015},
   type = {Journal Article}
}
@misc{RN13,
   author = {Vaswani, Ashish and Shazeer, Noam and Parmar, Niki and Uszkoreit, Jakob and Jones, Llion and Gomez, Aidan N. and Kaiser, Lukasz and Polosukhin, Illia},
   title = {Attention Is All You Need},
   year = {2017},
   type = {Journal Article}
}
@misc{RN38,
   author = {Walsh, Gary},
   title = {Therapeutic insulins and their large-scale manufacture},
   DOI = {10.1007/s00253-004-1809-x},
   url = {https://pubmed.ncbi.nlm.nih.gov/15580495/},
   year = {2005 },
   type = {Journal Article}
}
@article{RN20,
   author = {Wong, Jiecong Lin and Ka-Chun},
   title = {Off-target predictions in {CRISPR-Cas9} gene editing using deep learning},
   journal = {Bioinformatics},
   DOI = {10.1093/bioinformatics/bty554},
   year = {2018},
   type = {Journal Article}
}

相关内容