LaTeX技巧472:定義一個LaTeX參考文獻不帶編號且有縮進的方法


LaTeX_Fun的博客

LaTeX技巧381:參考文獻項第二行縮進如何定義?

\makeatletter
\renewenvironment{thebibliography}[1]
{\section*{\refname}%
\@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
\list{\@biblabel{\@arabic\c@enumiv}}%
{\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth
\advance\leftmargin\labelsep
\advance\leftmargin by 2em%
\itemindent -2em%
\@openbib@code
\usecounter{enumiv}%
\let\p@enumiv\@empty
\renewcommand\theenumiv{\@arabic\c@enumiv}}%
\sloppy
\clubpenalty4000
\@clubpenalty \clubpenalty
\widowpenalty4000%
\sfcode`\.\@m}
{\def\@noitemerr
{\@latex@warning{Empty `thebibliography' environment}}%
\endlist}
\makeatother

 

LaTeX技巧472:定義一個LaTeX參考文獻不帶編號且有縮進的方法

\makeatletter
\renewcommand\@biblabel[1]{}
\renewenvironment{thebibliography}[1]
     {\section*{\refname}%
      \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
      \list{\@biblabel{\@arabic\c@enumiv}}%
           {\settowidth\labelwidth{\@biblabel{#1}}%
            \leftmargin\labelwidth
            \advance\leftmargin\labelsep
            \itemindent-\labelsep
            \@openbib@code
            \usecounter{enumiv}%
            \let\p@enumiv\@empty
            \renewcommand\theenumiv{\@arabic\c@enumiv}}%
      \sloppy
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist}
\makeatother

 

Latex中如何制作參考文獻

一、用Google來做Latex的bib文件

1. 打開scholar.google.com

2. 定制   Scholar Preferences->Bibliography Manager ->Show links to import citations int 
o BibTeX (選中這個)

3. search something like “multicast” in the scholar.google.com, 
in the result list, kick “Import into BibTeX”    copy the text to bibtex database directly,

4 直接去編譯,不用任何修改

二、

 

LaTeX技巧心得23:BIBTeX制作參考文獻

 

BibTeX 是一種格式和一個程序, 用於協調LaTeX的參考文獻處理.

 

BibTeX 使用數據庫的的方式來管理參考文獻. BibTeX 文件的后綴名為 .bib . 先來看一個例子

@article{name1, 
author = {作者, 多個作者用 and 連接}, 
title = {標題}, 
journal = {期刊名}, 
volume = {卷20}, 
number = {頁碼}, 
year = {年份}, 
abstract = {摘要, 這個主要是引用的時候自己參考的, 這一行不是必須的} 
}

@book{name2, 
author =”作者”, 
year=”年份2008″, 
title=”書名”, 
publisher =”出版社名稱” 
}

說明:

  1. 第一行@article 告訴 BibTeX 這是一個文章類型的參考文獻. 還有其它格式, 例如 article, book, booklet, conference, inbook, incollection, inproceedings, manual, misc, mastersthesis, phdthesis, proceedings, techreport, unpublished 等等.
  2. 接下來的”name1″, 就是你在正文中應用這個條目的名稱.
  3. 其它就是參考文獻里面的具體內容啦.

在LaTeX中使用BibTeX 
為了在LaTeX中使用BibTeX 數據庫, 你必須先做下面三件事情:

1) 設置參考文獻的類型 (bibliography style). 標准的為 plain:

/bibliographystyle{plain}

將上面的命令放在 LaTeX 文檔的 /begin{document}后邊. 其它的類型包括

  • unsrt – 基本上跟 plain 類型一樣, 除了參考文獻的條目的編號是按照引用的順序, 而不是按照作者的字母順序.
  • alpha – 類似於 plain 類型, 當參考文獻的條目的編號基於作者名字和出版年份的順序.
  • abbrv – 縮寫格式 .

2) 標記引用 (Make citations). 當你在文檔中想使用引用時, 插入 LaTeX 命令

/cite{引用文章名稱}

“引用文章名稱” 就是前邊定義@article后面的名稱.

3) 告訴LaTeX生成參考文獻列表 . 在 LaTeX 的結束前輸入

/bibliography{bibfile}

這里bibfile 就是你的 BibTeX 數據庫文件 bibfile.bib .

運行 BibTeX 
分為下面四步

  • 用LaTeX編譯你的 .tex 文件 , 這是生成一個 .aux 的文件, 這告訴 BibTeX 將使用那些應用.
  • 用BibTeX 編譯 .bib 文件.
  • 再次用LaTeX 編譯你的 .tex 文件, 這個時候在文檔中已經包含了參考文獻, 但此時引用的編號可能不正確.
  • 最后用 LaTeX 編譯你的 .tex 文件, 如果一切順利的話, 這是所有東西都已正常了.

例子: 將上面的 BibTeX 的的例子保存為 bibtex-example.bib .

/documentclass{article} 
/usepackage{CJK} 
/begin{document} 
/begin{CJK}{UTF8}{gkai} 
%我是在linux下用使用latex的, window用戶將上一行改為/begin{CJK}{GBK}{kai} 
text/cite{name1}/cite{name2} 
中文 
把Latex中的 Reference 寫成中文的”參考文獻” 
%如果文檔類是article之類的, 用/renewcommand/refname{參考文獻} 
%如果文檔類是book之類的, 用/renewcommand/bibname{參考文獻} 
/renewcommand/refname{參考文獻} 
/bibliographystyle{plain} 
/bibliography{ bibtex-example.bib} 
/end{CJK} 
/end{document}

將上面的內容保存為bibtex-example.tex .

latex編譯一次, bibtex 編譯一次, 再用 latex編譯兩次就大功告成了

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM