1

I am customising my PhD bibliography with biblatex and I face the following problem: I want to keep a consistency between the citations in the text and the label names in the list of references, so that the reader quickly recognises the citation by its label.

This works very well if I limit the maxcitenames and maxalphanames to 1, by defining the master number to maxnames=1 then in order to keep all the authors in the reference, I define maxbibnames=20.

enter image description here

However, for maxnames=2 or more, it doesnt seem to work, even after defining maxalphanames=2 explicitly

enter image description here

Any solution/comment is welcome Here is my MWE:

\documentclass{article}
\usepackage [backend=bibtex,style=authoryear]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{refs.bib}
@article{a,
    title = {first publication},
    journal = {a first journal},
    author = {A},
    year = {2000},
}
@article{b,
    title = {second publication},
    journal = {a second journal},
    author = {X and C},
    year = {1988},
}
@article{c,
    title = {third publication},
    journal = {a third journal},
    author = {O and P and Q},
    year = {2006},
}
@article{h,
    title = {Observations of ingot macrosegregation on model systems},
    journal = {Metallurgical Transactions},
    author = {Hebditch, D. J. and Hunt, J. D.},
    year = {1974},
}
\end{filecontents}
\addbibresource{refs}
\ExecuteBibliographyOptions{ minnames=1, maxnames=2,                            
                            maxbibnames=20,
                            }

%define label before reference in list  
\renewbibmacro{begentry}{%
\textbf{(\printnames[][-\value{liststop}]{labelname}~\printfield{labelyear}\printfield{extrayear}})\\}

\begin{document}
\parencite{a} \\
\parencite{b} \\
\parencite{c} \\
\parencite{h} \\
\printbibliography
\end{document}
lockstep
  • 250,273
SAAD
  • 623
  • 2
    Does Adding an AuthorYear block at the beginning of bibliography entries help? Especially the construction with mymaxcitenames? – moewe Aug 01 '15 at 13:04
  • This is perfect ! However, can you add it as answer and briefly explain why it works with mymaxcitenames defined locally, while not with maxalphanames? – SAAD Aug 01 '15 at 13:33
  • 1
    The option maxalphanames applies only to the alphabetic style and cannot help us here. In order for biblatex to allow us to use the exact same commands to print names in citations and in the bibliography it changes an internal "citename" counter as soon as we get into bibliography territory (outside of a bibliography a "normal" citation is assumed). Thus all commands executed in the bibliography will use the same name settings, we can prevent this by locally redefining the value of this maxnames counter. – moewe Aug 01 '15 at 16:06

0 Answers0