You can use the package "natbib". The following is an example:
documentclass[12pt]{article} usepackage[super, sort]{natbib} bibpunct{(}{)}{;}{a}{,}{,} % required for natbib begin{document} Use the natbib package with options texttt{super} and texttt{sort}, and use verb+citep+ or verb+citet+ instead of the command verb+cite+. In detail, we need to include the natbib package and include the line begin{verbatim} bibliographystyle[super, sort]{natbib} bibpunct{(}{)}{;}{a}{,}{,} end{verbatim} in the preamble. And use the bibliographstyle texttt{plainnat}, i.e. verb+bibliographystyle{plainnat}+. The command verb+citet+ is for ``last name (year)'' and verb+citep+ for ``(last name, year)'' which will be shown in the text. The result of verb+citep{GoossensEtAl:1999}+ is citep{GoossensEtAl:1999}. The result of verb+citetcitet{GoossensEtAl:1999}+ is citet{GoossensEtAl:1999}. bibliographystyle{plainnat} % required for natbib bibliography{workshop} end{document}
The content of the file "
workshop.bib
" is below:
@book{GoossensEtAl:1999, author="{Goossens, M.} and {Rahtz, S.} with {Gurari, E., M.} and {Moore, R.} and {Sutor, R. S.}", title="The LaTeX, Web Companion", publisher="Addison-Wesley", year="1999" }
You can copy the above two files to your computer and compile them to see the
.
FAQ Category