訪問官網:http://www.ee.ic.ac.uk/hp/staff/dmb/perl/index.html
寫在前面
首先需要確定電腦上已經裝好texlive, 包含了 bibtex.exe,如:
然后,裝好了word,
下載bibtex4word
http://www.ee.ic.ac.uk/hp/staff/dmb/perl/bibtex4word.zip
即官網的bibtex4word.zip文件。下載后解壓在合適的地方,將其中的bibtex4word.dot拷貝到
C:\Users\*****\AppData\Roaming\Microsoft\Word\STARTUP 目錄下,where ***** is your user name。
如果找不到,搜索也行
添加用戶變量
需要添加兩個用戶變量 用戶變量用戶變量用戶變量重要的事情說3遍
變量名BIB_EXE
變量值D:\Program Files (x86)\TexliveRoot\texlive\2020\bin\win32\bibtex.exe (前面根據你自己機器中的bibtex.exe位置)
變量名OPENOUT_ANY
變量值r
添加完后,關閉word,重新打開,就會發現,在工具欄中點擊加載項:
就有我們想要的工具了!
在前面解壓的bibtex4word.zip文件中,有文件Test4w.doc,內容是官網使用教程。
獲取引文bib
方法諸多,例在dblp(https://dblp.uni-trier.de/)中,點擊文章左側下載button
就可以獲取很詳細的引文信息,如圖:
set bibtex4word style
還有很重要的一步,定義bibtex4word在word中,使用的風格,即版式。
Choosing a BibTeX Style:純英文引用請查看http://www.ee.ic.ac.uk/hp/staff/dmb/perl/index.html說明
但是很多時候,我們寫個中文報告材料什么的,中英混用是很正常的。首先去下載一個國風style。
增加參考文獻樣式bst文件。如GBT7714-2005.bst(下載:https://github.com/Haixing-Hu/GBT7714-2005-BibTeX-Style)
下載后,拷入D:\Program Files (x86)\TexliveRoot\texlive\2020\texmf-dist\bibtex\bst\gbt7714文件下。
打開TexLive command-line(在開始程序中即可找到)
輸入texhash則會刷新texlive文件夾
Microsoft Windows [版本 10.0.18363.1379] (c) 2019 Microsoft Corporation。保留所有權利。 C:\Users\user>texhash texhash: Updating D:/Program Files (x86)/TexliveRoot/texlive/texmf-local/ls-R... texhash: Updated D:/Program Files (x86)/TexliveRoot/texlive/texmf-local/ls-R. texhash: Updating D:/Program Files (x86)/TexliveRoot/texlive/2020/texmf-config/ls-R... texhash: Updated D:/Program Files (x86)/TexliveRoot/texlive/2020/texmf-config/ls-R. texhash: Updating D:/Program Files (x86)/TexliveRoot/texlive/2020/texmf-var/ls-R... texhash: Updated D:/Program Files (x86)/TexliveRoot/texlive/2020/texmf-var/ls-R. texhash: Updating D:/Program Files (x86)/TexliveRoot/texlive/2020/texmf-dist/ls-R... texhash: Updated D:/Program Files (x86)/TexliveRoot/texlive/2020/texmf-dist/ls-R. texhash: Done. C:\Users\user> C:\Users\user>
排版時參考文獻樣式可選GBT7714-2005/^/nsch
- n,表示強制文后文獻以數字順序排列,不管選用的樣式文件是著者年還是順序方式的;
- s,表示“sort”,將順序引用的標記[2,4,1,3]整理為[1,2,3,4];
- c,表示“compress”,將順序引用的標記[1,2,3,4]壓縮為[1-4];
- h,表示“hyperlink”(如:plain/h;acm/h),將引用標記與文后文獻的對應條目之間建立超鏈接關系,按住“ctrl”鍵用鼠標左擊標記即可跳轉至對應的文獻條目,返回則是按住“alt”鍵后按一下方向鍵中的"left"鍵即可;
- ^,表示上標引用方式,即[4]樣式;
- [,表示引用標記采用方括號樣式,例如[4-9];
- (,表示引用標記采用圓括號樣式,例如(Smith, 2000);
使用Bibtex4Word
導入數據庫
選擇導入bib文件,reference.bib
bib數據庫的編碼要和選用的bst文件保持一致,若選擇的是GBK編碼形式的bst文件,則bib數據庫也必須是GBK編碼的。
設置bibtex4word版式
點擊圖標在輸入框中填入
GBT7714-2005/^/nsch
添加citation
在合適的位置,貼入bib文件中的關鍵詞
生成文后引文列表
點擊即可
建議先用一個測試文件熟悉操作 \broken