1

With biblatex (+biber / lualatex) I wish to create a citation style as follows: the whole citation is within brackets and hyperlinked to the relevant bibliography entry, and has the form Firstauthorname.year with the addition of an alphabetic identifier if that form is ambiguous.

I could go some way by various package import options, but not quite far enough:

\documentclass{article}
\usepackage[
    style=authoryear,
    backend=biber,
    maxcitenames=1,
    uniquelist=false,
    ]{biblatex}
\usepackage{filecontents}
\usepackage{hyperref}
\begin{filecontents*}{\jobname.bib}
    @article{one,
      author = {Alpha Bravo and Charlie Delta},
      title = {How to make cites and influence formatting},
      journal = {Journal of LateX typesetting},
      date = {2025},
    }
    @article{two,
      author = {Alpha Bravo and Echo Foxtrot},
      title = {Biblatex citations and where to find them},
      journal = {Journal of LateX sightseeing},
      date = {2025},
    }
    @article{three,
      author = {Charlie Delta and Echo Foxtrot},
      title = {The man who killed Don Knuth},
      journal = {Journal of LateX novelling},
      date = {2025},
    }
\end{filecontents*}
\addbibresource{\jobname.bib}

\begin{document}

\begin{tabular}{l|l}
    Actual & Desired (need hyperlinks too) \\ \hline
    \cite{one} & [Bravo.2025a] \\
    \cite{two} & [Bravo.2025b] \\
    \cite{three} & [Delta.2025] \\
  \end{tabular}


  \printbibliography
\end{document}

Output of the MWE

There are lots of kind-of-duplicates-but-not-really, such as Custom BibLaTeX style but I was not able to deduce what needs to be done.

The answer is somewhere in part 4 of the biblatex manual, which I tried reading, but I cannot make heads or tails of it. Same thing for a direct dive in the source code of the bibliographic macros (biblatex.def).

0

This seems to be a borderline case between authoryear and alphabetic citation styles. Generally, I'd advise against abusing alphabetic for a style that is essentially an authoryear variation, but here it is not exactly clear to me what the style should be.

Since it is currently tricky to disable the "et al." (it will be possible in future biblatex versions: https://github.com/plk/biblatex/issues/861), I'll present an alphabetic solution first. This solution mainly relies on \DeclareLabelalphaTemplate.

\documentclass{article}
\usepackage[
    style=authoryear,
    citestyle=alphabetic,
    backend=biber,
    maxcitenames=1,
    maxalphanames=1,
    uniquelist=false,
    ]{biblatex}
\usepackage{hyperref}

\renewcommand*{\labelalphaothers}{}
\DeclareLabelalphaTemplate{
  \labelelement{
    \field[final]{shorthand}
    \field{label}
    \field{labelname}
  }
  \labelelement{
    \literal{.}
  }
  \labelelement{
    \field{year}
  }
}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{one,
  author  = {Alpha Bravo and Charlie Delta},
  title   = {How to make cites and influence formatting},
  journal = {Journal of {\LaTeX} typesetting},
  date    = {2025},
}
@article{two,
  author  = {Alpha Bravo and Echo Foxtrot},
  title   = {Biblatex citations and where to find them},
  journal = {Journal of {\LaTeX} sightseeing},
  date    = {2025},
}
@article{three,
  author  = {Charlie Delta and Echo Foxtrot},
  title   = {The man who killed Don Knuth},
  journal = {Journal of {\LaTeX} novelling},
  date    = {2025},
}
\end{filecontents*}
\addbibresource{\jobname.bib}

\begin{document}

\begin{tabular}{ll}
    Actual & Desired (need hyperlinks too) \\ \hline
    \cite{one} & [Bravo.2025a] \\
    \cite{two} & [Bravo.2025b] \\
    \cite{three} & [Delta.2025] \\
  \end{tabular}

  \printbibliography
\end{document}

[Bravo.2025a]//[Bravo.2025b]//[Delta.2025]


In future versions of biblatex (v3.13 and above) you should be able to do something like the following. (I'm using my biblatex-ext bundle to be able to quickly change the parentheses to brackets.)

\documentclass{article}
\usepackage[
    style=ext-authoryear,
    backend=biber,
    maxcitenames=1,
    uniquelist=false,
    nohashothers=true, nosortothers=true,
    ]{biblatex}
\usepackage{hyperref}

\DeclareOuterCiteDelims{parencite}{\bibopenbracket}{\bibclosebracket}

\DeclareDelimFormat{nameyeardelim}{\addperiod}

\DeclareNameFormat{labelname}{%
  \usebibmacro{name:family}
    {\namepartfamily}
    {\namepartgiven}
    {\namepartprefix}
    {\namepartsuffix}}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{one,
  author  = {Alpha Bravo and Charlie Delta},
  title   = {How to make cites and influence formatting},
  journal = {Journal of {\LaTeX} typesetting},
  date    = {2025},
}
@article{two,
  author  = {Alpha Bravo and Echo Foxtrot},
  title   = {Biblatex citations and where to find them},
  journal = {Journal of {\LaTeX} sightseeing},
  date    = {2025},
}
@article{three,
  author  = {Charlie Delta and Echo Foxtrot},
  title   = {The man who killed Don Knuth},
  journal = {Journal of {\LaTeX} novelling},
  date    = {2025},
}
\end{filecontents*}
\addbibresource{\jobname.bib}

\begin{document}

\begin{tabular}{ll}
    Actual & Desired (need hyperlinks too) \\ \hline
    \autocite{one} & [Bravo.2025a] \\
    \autocite{two} & [Bravo.2025b] \\
    \autocite{three} & [Delta.2025] \\
  \end{tabular}

  \printbibliography
\end{document}

[Bravo.2025a]//[Bravo.2025b]//[Delta.2025]

If the new options nohashothers=true, nosortothers=true, are dropped from the MWE then the code will work even in the current version of biblatex. But since the "et al." cannot be properly ignored, this can lead to problems with authors who wrote a work without co-authors and another work with co-authors.

  • First version is exactly what I needed. (I still have no idea how to modify the code myself if I need to change it later, but that's my fault, not yours.) – JME May 20 at 9:31

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.