1. 程式人生 > >LaTeX: 參考文獻的使用——正文引用的格式以及Reference的格式調整

LaTeX: 參考文獻的使用——正文引用的格式以及Reference的格式調整

問題1:生成不帶編號的具有懸掛縮排的參考文獻格式
方法一:使用bibitem生成的文獻

原來的參考文獻樣式以及程式碼如下:

原來的參考文獻程式碼
原來的參考文獻樣式

生成不帶編號的具有懸掛縮排的參考文獻格式
不帶編號的具有懸掛縮排的參考文獻

新增第一部分程式碼即可:

   \makeatletter
    \renewcommand\@biblabel[1]{}
    \renewenvironment{thebibliography}[1]
    {\section*{\refname}%
    \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
    \list{\@biblabel{\@arabic\
[email protected]
}}% {\settowidth\labelwidth{\@biblabel{#1}}% \leftmargin\labelwidth \advance\leftmargin\labelsep \advance\leftmargin by 2em% \itemindent -2em% \@[email protected] \usecounter{enumiv}% \let\[email protected]\@empty \renewcommand\theenumiv{\@arabic\
[email protected]
}}% \sloppy \clubpenalty4000 \@clubpenalty \clubpenalty \widowpenalty4000% \sfcode`\.\@m} {\def\@noitemerr {\@[email protected]{Empty `thebibliography' environment}}% \endlist} \makeatother \begin{thebibliography}{99} \bibitem{Ref1} % Format for Journal Reference C.L. Liu, F. Yin, D.H. Wang and Q.F. Wang, Online and Offline Handwritten Chinese Character Recognition: Benchmarking on New Databases, Pattern Recognition, vol.46, pp.155–162. (2013) \bibitem{Ref2} F. Kimura, K. Takashina, S. Tsuruoka, and Y. Miyake, Modified Quadratic Discriminant Functions and the Application to Chinese Character Recognition. IEEE Trans. Pattern Analysis and Machine Intelligence, \end{thebibliography}

方法二:使用bibtex生成不帶編號的具有懸掛縮排的參考文獻格式
使用方法二的就把方法一的那些都刪除

程式碼:

%新增巨集包:
\usepackage{natbib}
\usepackage{natbibspacing}
%設定參考文獻間的間距
\setlength{\bibspacing}{0\baselineskip}


%設定文獻的樣式
\bibliographystyle{plain} 
%新增自己的bib檔案
\bibliography{mybibs}

注意必須有.bib檔案,不然呼叫natbib巨集包會報錯:
--------------------------------------------------------------------------------------------------------
! Package natbib Error: Bibliography not compatible with author-year citations.

(natbib) Press to continue in numerical citation style.

See the natbib package documentation for explanation.
Type H for immediate help.

l.88 …mand\[email protected]@numbers{}\[email protected]@numbers

?
--------------------------------------------------------------------------------------------------------
當然有時候有.bib檔案也會報錯,那麼檢查
Follow these steps:
1.Delete the .aux and the .bbl files
2.Do your changes (in the \bibliographystyle or in any option of natbib)
3,Run LaTeX
4.Run BibTeX
5,借鑑與這裡
6.點選開啟連結http://tex.stackexchange.com/questions/54480/package-natbib-error-bibliography-not-compatible-with-author-year-citations

另外不同行間距的文獻格式,通過引數修改得到
在這裡插入圖片描述

在這裡插入圖片描述

問題2:將正文中顯示編號的參考文獻改為顯示作者加年份的表達方式

不同的引用命令得到不同的正文的引用樣式:
注意需要呼叫natbib巨集包才能開啟這個大招~
作者縮寫(年份)
(作者縮寫,年份)
在這裡插入圖片描述

要將作者加年份的引用方式改為編號的,又需要別的方法,反向操作不管用~暫時不想整理