0

Is there a way to set up the bibliography so that bibstyle is a "superposition" of the phys and alphabetic styles? In particular, I would like to:

  • Have alphabetic codes, like [Doe98], pop up in front of the bib entry, as they do when bibstyle=alphabetic;
  • Set up the rest of the entry like it appears when bibstyle=phys, i.e. non-italicized journal name, boldface journal volume number, parenthetical date, etc.

I have ingenuously tried using both options style=phys and bibstyle=alphabetic when calling biblatex, but it didn't work as expected.

1 Answer 1

1

You can combine different styles by selecting them with bibstyle and citestyle, but in this case you additionally need to copy a few things from alphabetic.bbx in order to get alphabetic labels also in the bibliography. We also explicitly a sensible sorting for an alphabetic style (sorting=anyt,).

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[backend=biber,
  bibstyle=phys, citestyle=alphabetic,
  sorting=anyt,
]{biblatex}

\setlength{\biblabelsep}{2\itemsep}

\DeclareFieldFormat{bibentrysetcount}{\mkbibparens{\mknumalph{#1}}}
\DeclareFieldFormat{labelalphawidth}{\mkbibbrackets{#1}}
\DeclareFieldFormat{shorthandwidth}{\mkbibbrackets{#1}}

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

\addbibresource{biblatex-examples.bib}

\begin{document}
\autocite{sigfridsson,worman,geer,nussbaum}
\printbibliography
\end{document}

[SR98; Wor02; Gee85; Nus78]

1
  • Thank you, it works! I would upvote but for some reason the website does not let me (even though I have more than 15 rep)
    – giobrach
    Commented Jul 13, 2020 at 18:31

You must log in to answer this question.

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