【转】Latex参考文献上标和插入顺…

来源:互联网 发布:微信数据移动到sd卡 编辑:程序博客网 时间:2024/06/03 17:36

Latex参考文献上标和插入顺序

想要是插入的参考文献安装插入顺序而不是作者姓名顺序排序,只要设置bibliographystyle为unsrt即可。至于参考文献变成上标以及方括号的问题相对复杂一些,可以参考下面给出的我的模板。这个模板很简陋,只实现了一些基本功能,实现了题目中提出的两个问题而已。


Solutions about the superior and sorts of References
    When writingpapers using latex and bibtex, the problems of superior and sortsof the References may be asked frequently. In order to arrange thereferences in the order of inserting but not the order of theauthors' names, all we need to do is to change thebibliographystyle from 'plain' to 'unsrt'. That's rather easy. Butit becomes somewhat complicated when adding square brackets to thereferences and make them become superior. In the latex source filebellow, a rather simple example is given, ones who are confusedabout this problem can take a look at it. Hope it helps.

\documentclass[a4paper,11pt]{article}%Define the documentclass定义文件类型

%===================Package Area==================%
\usepackage{CJK} % CJK enviroment CJK环境(中日韩)
\usepackage{indentfirst} % Work with the command ``\CJKindent'' tomake an indent at the begining of each paragraph. 与``\CJKindent''配合实现每个段落开头的自动缩进
\usepackage{textcomp}
\usepackage{latexsym}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage[dvips]{graphicx}
\usepackage{flafter}
\usepackage{booktabs, longtable}
\usepackage{caption2}
\usepackage{pxfonts}
\usepackage{cite}
\usepackage{enumerate}% Enumerate,实现枚举。
\usepackage{cmap}
%===============End Package Area==================%

\addtolength{\textheight}{ 2cm}
\addtolength{\textwidth}{2 cm}
\addtolength{\voffset}{- 2cm}

\begin{document}
\begin{CJK}{GBK}{song}
\CJKindent

%------------中文设置--------------------------
\makeatletter %Show the references as superior and add squarebrackets to them将文献引用作为上标出现,增加括号
\def\@cite#1#2{\textsuperscript{[{#1\if@tempswa , #2\fi}]}}
\makeatother
\renewcommand{\refname}{\centerline{参考文献}}
\renewcommand{\tablename}{表}
\renewcommand{\captionlabeldelim}{\quad}
%===================Image settings========================%
\renewcommand{\figurename}{图}
\renewcommand{\captionlabeldelim}{\quad} %Need caption2 macropackage
%===============End image settings========================%
%-----------中文设置--------------------------
%opening

\title{我的\LaTeX + Bibtex 模板}
\author{杨英超}
\maketitle

\begin{abstract}
这里解决两个问题:
\begin{itemize}
\item怎样将参考文献变成上标,并增加方括号?
\item 怎样让参考文献按照引用顺序排序?
\end{itemize}

\end{abstract}

\section{参考文献问题}
如何将参考文献变成上标并增加括号?只要按照本文前面的设置就可以了\footnote{具体设置参考本文给出的\LaTeX原文件}。我们这里看一个例子,李白的静夜思。
\begin{center}
锄禾日当午~\cite{ICA_SW_Pulse} ,
汗滴禾下土~\cite{DS_1},
谁知盘中餐~\cite{Yuliang2007},
粒粒皆辛苦~\cite{ICA_EEG}。
\end{center}

怎么样?还可以吧?

\section{参考文献按照引用顺序排序}

很简单,只要将\\{\sl{bibliographystyle}} \{ \}设置为{\sl{unsrt}}即可。

\bibliographystyle{unsrt}
\bibliography{refs}

\end{CJK}
\end{document}



下面这张图片是用这个Latex文件生成的PDF的截图(Thefigure bellow is a snapshot of the PDF file generated from thelatex file above):
【转】Latex参考文献上标和插入顺序 - kayneo - Kayneo 最天使~