Following is the latex code provided by @Mike Renfro from Putting Serial Numbers in References
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{refs.bib}
@BOOK
{KandR,
AUTHOR = "Kernighan, Brian W. and Ritchie, Dennis M.",
TITLE = "{The C Programming Language Second Edition}",
PUBLISHER = "Prentice-Hall, Inc.",
YEAR = 1988
}
\end{filecontents*}
\usepackage[bibstyle=numeric,citestyle=authoryear,backend=bibtex]{biblatex}
\addbibresource{refs.bib}
\defbibenvironment{bibliography}
{\enumerate{}
{\setlength{\leftmargin}{\bibhang}%
\setlength{\itemindent}{-\leftmargin}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}}
{\endenumerate}
{\item}
\renewcommand*{\nameyeardelim}{\addcomma\space}
\begin{document}
In 1988 C was totally awesome. \autocite{KandR}
\printbibliography
\end{document}
However in the text at same time if I have to use (Kernighan and Ritchie, 1988) and at some places Kernighan and Ritchie (1988) then what will be the citing style for second scenario.
Moreover in references, i also need them to appear like this:
- Kernighan, B.W. and Ritchie, D.M. The C Programming Lan- guage Second Edition. Prentice-Hall, Inc., 1988.
ie last name appearing first and accordingly all refernces are arranged in alphabetically order according to last name of first author.
How it can be done. Please help.
\textcite{KandR}
? Ad 2:sorting=nty
/sorting=nyt
(name-title-year/name-year-title) and\DeclareNameAlias{sortname}{last-first}
– moewe Apr 18 '14 at 12:59sorting
to the load-time options, so\usepackage[bibstyle=numeric,citestyle=authoryear,backend=bibtex]{biblatex}
reads\usepackage[bibstyle=numeric,citestyle=authoryear,backend=bibtex,sorting=nty]{biblatex}
or\usepackage[bibstyle=numeric,citestyle=authoryear,backend=bibtex,sorting=nyt]{biblatex}
afterward.\DeclareNameAlias{sortname}{last-first}
should be added somewhere in the preamble afterbiblatex
was loaded (put it before\renewcommand*{\nameyeardelim}{\addcomma\space}
, for example). – moewe Apr 18 '14 at 13:07