How can I set biblatex to insert "1. " before first bibliography item and so on? The bibliography is sorted by author and the numbers are not meant to be used anywhere else.
[Tex/LaTex] Biblatex enumerating sorted bibliography (using authoryear-ibid style)
biblatexnumbering
Related Solutions
Ad 1: \renewcommand*{\bibinitdelim}{}
works for me. EDIT: Note that \bibinitdelim
requires Biber instead of BibTeX. As this command was added in biblatex
1.3, there's a chance that it works with your distribution (try the backend=biber
option); nevertheless consider to upgrade to the current versions of biblatex
and Biber.
Ad 2: Use the package option useprefix=true
.
Ad 3: \usepackage{xpatch}\xapptobibmacro{date+extrayear}{\nopunct}{}{}
.
Ad 4: Use the addendum
instead of the note
field. EDIT: In the case at hand, follow moewe's advice and use the url
and urldate
fields.
\documentclass[12pt,a4paper,oneside]{report}
\usepackage{filecontents}
\usepackage[
firstinits=true, % render first and middle names as initials
useprefix=true,
maxcitenames=3,
maxbibnames=99,
style=authoryear,
dashed=false, % re-print recurring author names in bibliography
natbib=true,
url=false
]{biblatex}
\renewcommand*{\bibinitdelim}{}
\usepackage{xpatch}
\xapptobibmacro{date+extrayear}{\nopunct}{}{}
% Use single quotes around titles:
\usepackage[british]{babel}
\usepackage{csquotes}
\DeclareNameAlias{author}{last-first}
\renewcommand*{\mkbibnamefirst}[1]{{\let~\,#1}} % insert thin spaces between author initials
\renewcommand*{\nameyeardelim}{\addcomma\addspace} % insert a comma between author and year in-text citations
\renewcommand*{\newunitpunct}{\addcomma\addspace} % comma as separator in bibliography, not full stop
\setlength\bibitemsep{1.5\itemsep} % increase spacing between entries in bibliography
\renewbibmacro{in:}{} % remove 'in:' preceding article title
% Place volume number within parentheses:
\renewbibmacro*{volume+number+eid}{
\printfield{volume}
\setunit*{\addnbspace}% NEW (optional); there's also \addnbthinspace
\printfield{number}
\setunit{\addcomma\space}
\printfield{eid}}
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}
\begin{filecontents}{\jobname.bib}
@Article{Belshe_2010a,
Title = {{{E}fficacy of live attenuated influenza vaccine in children against influenza {B} viruses by lineage and antigenic similarity}},
Author = {Belshe, R. B. and Coelingh, K. and Ambrose, C. S. and Woo, J. C. and Wu, X.},
Journal = {Vaccine},
Year = {2010},
Month = {Feb},
Addendum = {[Online]. Available at: \url{example.com} (Accessed: 10 January 2013)},
Number = {9},
Pages = {2149--2156},
Volume = {28},
}
@Article{de-Silva_2012,
Title = {{{A} comprehensive analysis of reassortment in influenza {A} virus}},
Author = {de Silva, U. C. and Tanaka, H. and Nakamura, S. and Goto, N. and Yasunaga, T.},
Journal = {Biol Open},
Year = {2012},
Month = {Apr},
Number = {4},
Pages = {385--390},
Volume = {1},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\nocite{*} % print all citations
\begin{document}
\printbibliography[title=References]
\end{document}
Try this
\documentclass{beamer}
\usepackage[backend=biber, citestyle=numeric, bibstyle=authoryear, sorting=none, autocite=superscript, labeldateparts]{biblatex}
\addbibresource{biblatex-examples.bib}
\setbeamertemplate{bibliography item}{\insertbiblabel}
\makeatletter
\input{numeric.bbx}
\makeatother
\newbibmacro*{aycite:shorthand}{%
\printtext[bibhyperref]{\printfield{shorthand}}}
\newbibmacro*{aycite:label}{%
\iffieldundef{label}
{\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}
{\printtext[bibhyperref]{\printfield{label}}}}
\newbibmacro*{aycite:labelyear+extrayear}{%
\iffieldundef{labelyear}
{}
{\printtext[bibhyperref]{\printlabeldateextra}}}
\newbibmacro*{aycite}{%
\iffieldundef{shorthand}
{\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
{\usebibmacro{aycite:label}%
\setunit{\printdelim{nonameyeardelim}}}
{\printnames{labelname}%
\setunit{\printdelim{nameyeardelim}}}%
\usebibmacro{aycite:labelyear+extrayear}}
{\usebibmacro{aycite:shorthand}}}
\DeclareCiteCommand{\supercite}
{}
{\footnote[\thefield{labelnumber}]{\usebibmacro{prenote}\usebibmacro{aycite}\usebibmacro{postnote}}}
{\supercitedelim}
{}
\begin{document}
\begin{frame}
Citation one \autocite[12]{sigfridsson}
\end{frame}
\begin{frame}
Citation two \autocite{worman}
\end{frame}
\begin{frame}
Citation three \autocite{nussbaum}
Citation four \autocite{sigfridsson}
\end{frame}
\begin{frame}
\frametitle{References}
\printbibliography
\end{frame}
\end{document}
Essentially we combine authoryear
and numeric
as in Combining style numeric with style authoryear in BibLaTeX, furthermore, we use \supercite
to give us a footnote with the citation number. The code for the ay
macros is from authoryear.cbx
. Numbers are printed in the bibliography thanks to How do I get numbered entries in a beamer bibliography
Best Answer
Biblatex manual section 3.5.7 actually has a solution for this, I must have missed it the previous time. Changed
\list
to\enumerate
: