1

I'm trying to obtain a bibliography which looks like this: enter image description here

The most important aspects that I need are:

  • In the citation there must be [FirstAuthorSurname, year], it's very important because I found another style which puts the last author surname in the brackets;

  • The authors' name in the bibliography must be in this order: N. Surname, not Surname N.;

  • I need the possibility to sort bibliography items alphabetically by the name in the brackets.

Thank you very much!

1 Answer 1

1

Here is a solution using biblatex. It takes the trad-alpha as the base style and the output is obtained by some (simple) customisation of the label.

\DeclareLabelalphaNameTemplate{
  \namepart{family}
}

The template above is just to tell we are going to use the family name part to create the label.

\DeclareLabelalphaTemplate{
 \labelelement{\field[names=1,noalphaothers]{labelname}}
 \labelelement{\literal{,~}}
 \labelelement{\field{year}}
}

For the label, the first optional parameter (names=1) is to instruct to consider only the family name of the first author. The secondnoapohaohters` is to prevent to put a market when there are multiple authors.

The final step is to adjust the definition of the bibliography (a list), where we set the indent of the list to a fixed width instead of the width of the (longest) label.

\defbibenvironment{bibliography}
    {\list
       {\printtext[labelalphawidth]{%
          \printfield{labelalpha}%
          \printfield{extraalpha}}}
       {\setlength{\labelwidth}{\parindent}%
        \setlength{\leftmargin}{\labelwidth}%
        \setlength{\labelsep}{\biblabelsep}%
        \addtolength{\leftmargin}{\labelsep}%
        \setlength{\itemsep}{\bibitemsep}%
        \setlength{\parsep}{\bibparsep}}%
        \renewcommand*{\makelabel}[1]{##1\hss}}
    {\endlist}
    {\item}%

A complete file looks like:

\documentclass{article}

\usepackage[giveninits=true,style=trad-alpha]{biblatex}

\addbibresource{biblatex-examples.bib}

\DeclareLabelalphaNameTemplate{
  \namepart{family}
}

\DeclareLabelalphaTemplate{
 \labelelement{\field[names=1,noalphaothers]{labelname}}
 \labelelement{\literal{,~}}
 \labelelement{\field{year}}
}

\defbibenvironment{bibliography}
    {\list
       {\printtext[labelalphawidth]{%
          \printfield{labelalpha}%
          \printfield{extraalpha}}}
       {\setlength{\labelwidth}{\parindent}%
        \setlength{\leftmargin}{\labelwidth}%
        \setlength{\labelsep}{\biblabelsep}%
        \addtolength{\leftmargin}{\labelsep}%
        \setlength{\itemsep}{\bibitemsep}%
        \setlength{\parsep}{\bibparsep}}%
        \renewcommand*{\makelabel}[1]{##1\hss}}
    {\endlist}
    {\item}%

\begin{document}

\cite{knuth:ct:a,knuth:ct:b,knuth:ct:c}
\cite{murray}

\printbibliography  
\end{document}

and produces

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .