1

I'm exploring the capabilities of biblatex. I'm using the following example:

\documentclass{article}

\usepackage[style=alphabetic,natbib=true,backend=bibtex]{biblatex}

\usepackage{filecontents}

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

\addbibresource{\jobname.bib}

\begin{document}

Some text about \citet{A01}.

\printbibliography

\end{document}

This results in the following output:

current output

Instead, I'd like to format citations as [Author(2001)] instead of [Auth2001], as illustrated below.

desired result

How can I achieve this customized citation? Ideally, I'd like to keep the available natbib commands (currently achieved through natbib=true) and modify my current invocations of \cite as little as possible.

0

The comment by henrique above hinted me at the correct solution. Switching to biber and using \DeclareLabelalphaTemplate solves the problem. Note that for the case of multiple authors, maxalphanames=1 limits the number of authors that are listed in a citation to 1 and \renewcommand*{\labelalphaothers}{} omits the + that would appear in entries for multiple authors otherwise.

\documentclass{article}

\usepackage[style=alphabetic,natbib=true,backend=biber,maxalphanames=1]{biblatex}

\usepackage{filecontents}

\renewcommand*{\labelalphaothers}{}

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

\addbibresource{\jobname.bib}

\DeclareLabelalphaTemplate{
  \labelelement{
    \field[final]{shorthand}
    \field{labelname}
    \field{label}
  }
  \labelelement{
    \literal{(}
  }
  \labelelement{
    \field{year}
  }
  \labelelement{
    \literal{)}
  }
}

\begin{document}

Some text about \citet{A01}.

\printbibliography

\end{document}
|improve this answer|||||

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.