问题1:生成不带编号的具有悬挂缩进的参考文献格式
方法一:使用bibitem生成的文献
原来的参考文献样式以及代码如下所示:
要生成不带编号的具有悬挂缩进的参考文献格式
添加第一部分代码即可:
\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
\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
\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\NAT@force@numbers{}\NAT@force@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宏包才能开启这个大招~
作者缩写(年份)
(作者缩写,年份)
要将作者加年份的引用方式改为编号的,又需要别的方法,反向操作不管用~暂时不想整理