4

I need to realize a special style with biblatex for cites within a paragraph. The requirements are the following:

  • General cite should be last name of first author and year: Smith (2012)
  • More pubs in one year with Smith (2012a), Smith (2012b) etc.
  • Having two authors, both are mentioned with last name and year: Smith and Paul (2009)
  • More than two authors should be Chin et al. (2013)

I would be more than happy to get that realized, since I need to prepare material for students at the present semester.

With the one I tried below, the following issues appeared:

  • Cite: the year is not set in parenthesis ("A. Author 2001" instead of "A. Author (2001)")
  • Cite: I only would need the last name, like "Author (2001)"
  • "maxcitenames"seems not to work...
  • Bib: Authors should always listed with last name first and initials, like "Author, A. und Author, B. (2001). Alpha." and not "Author, A. und B. Author (2001). Alpha."

Here is what I tried as minimal working example.

\documentclass{article}

\usepackage[%
    style=authoryear,%
    backend=biber,%
    maxcitenames=2,%
    language=ngerman]{biblatex}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}

@misc{A01a,
  author = {Author, A. and Author, B.},
  year = {2001},
  title = {Alpha},
}

@misc{A01b,
  author = {Author, A. and Author, B. and Author, B.},
  year = {2001},
  title = {Alpha},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

\cite{A01}

\cite{A01a}

\cite{A01b}

\printbibliography
\end{document}
  • 2
    What have you tried, where didn’t it work out? This looks pretty close to the authoryear style. tex.stackexchange.com/questions/12806/… might be helpful as a start. Please specify your problem and make sure to add a minimal working example (MWE) including a bib file with all the necessary test cases (see “Bibliography Files” under the second link). – doncherry Oct 14 '13 at 13:37
4

In your MWE, the initials were always shown to differentiate between A. Author and B. Author, who share a last name and must be told apart by their initial. If you change the names, the initials will go away.

The maxcitenames problem seems to be related to the duplicate name Author as well; if you change the names, the et al. works correctly.

To get the year in parentheses, add the option natbib, which doesn’t change anything, but only enables more macros. Then, use \citet{foo} instead of \cite{foo}. (See Put parentheses around year in citation.)

To change the ordering of the names, use:

\DeclareNameAlias{sortname}{last-first}
\DeclareNameAlias{default}{last-first}

(For a detailed explanation see biblatex - Order last-first for the names of multiple editors?.)

\documentclass{article}

\usepackage[%
    style=authoryear,%
    backend=biber,%
    maxcitenames=2,%
    language=ngerman,%
    natbib
    ]{biblatex}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}

@misc{A02,
  author = {Author, A.},
  year = {2001},
  title = {Beta},
}

@misc{A01a,
  author = {Buthor, B. and Cuthor, C.},
  year = {2001},
  title = {Alpha},
}

@misc{A01b,
  author = {Duthor, D. and Euthor, E. and Futhor, F.},
  year = {2001},
  title = {Alpha},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\DeclareNameAlias{sortname}{last-first}
\DeclareNameAlias{default}{last-first}

\begin{document}

\citet{A01}

\citet{A02}

\citet{A01a}

\citet{A01b}

\printbibliography
\end{document}

output

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.