2

I'm writing a report that cites extensive primary sources without an author field. To avoid verbosity, I make sure the "shorttitle" field is what gets printed in the text.

Normally it's very hard to identify short titles in the bibliography; however, my bibliography is printing short titles first, before the full reference. This makes it helpful to find the reference so it's all well and good. For example,

@report{example_1965,
    title = {This is an example report blah blah},
    shorttitle ={Example Report},
    date = {1965-8-27},
}

gets printed like so in the bibliography:

Example Report (August 27, 1965). This is an example report blah blah.

There's just one problem: the bibliography is still sorting alphabetically by title, not by shorttitle. As a result, everything is out of order. Example:

Example Report 2 (August 27, 1965). A This is an example report blah blah.

Example Report 3 (August 27, 1965). B This is an example report blah blah.

Example Report 1 (August 27, 1965). C This is an example report blah blah.

Ideally reports would be ordered by their short title (number) since this appears first in each reference. How can I instruct biblatex to sort by "shorttitle" rather than "title"?

I'm really stuck on this problem after a lot of searching. There's some hint that an option like "label" might work, but I'd rather not go through the list of 3000+ sources to find and change all the relevant "shorttitle"s into "label"s. Is there a solution I'm overlooking?

MWE:

\documentclass[12pt]{report}

\begin{filecontents}{\abibliography.bib}
    @report{example_1965_1,
    title = {C This is an example report blah blah},
    shorttitle ={Example Report 1},
    date = {1965-8-27},
}
    @report{example_1965_2,
    title = {B This is an example report blah blah},
    shorttitle ={Example Report 2},
    date = {1965-8-29},
}
    @report{example_1965_3,
    title = {A This is an example report blah blah},
    shorttitle ={Example Report 3},
    date = {1965-8-28},
}
\end{filecontents}

% some customizations my publisher requires
\usepackage[
natbib=true,
maxcitenames=2, 
maxbibnames=99,
style=authoryear,
backend=bibtex, 
sorting=nyt, 
citetracker=true,
citestyle=authoryear-comp,
refsegment=chapter
]{biblatex}
\addbibresource{abibliography.bib}

\ExecuteBibliographyOptions[incollection]{useeditor=false}
\DeclareNameAlias{sortname}{last-first} 

\AtEveryCitekey{\ifciteseen{}{\defcounter{maxnames}{6}}}

\AtEveryBibitem{\clearfield{issn}}
\AtEveryBibitem{\clearlist{issn}}

\AtEveryBibitem{\clearfield{language}}
\AtEveryBibitem{\clearlist{language}}

\AtEveryBibitem{\clearfield{doi}}
\AtEveryBibitem{\clearlist{doi}}

\AtEveryBibitem{\clearfield{url}}
\AtEveryBibitem{\clearlist{url}}

\AtEveryBibitem{%
  \ifentrytype{online}
    {}
    {\clearfield{urlyear}\clearfield{urlmonth}\clearfield{urlday}}}


\begin{document}

    \tableofcontents

    \chapter{some_chapter}

blah blah \citep{example_1965_3} and \citep{example_1965_2} and \citep{example_1965_1}

% bibliographies
    \clearpage

% more required customizations
\titleformat{\chapter}[display]
{\normalfont\bfseries\filcenter}{}{0pt}{\large\bfseries\filcenter{#1}} 
\titlespacing*{\chapter}
  {0pt}{0pt}{30pt}

\begin{singlespace}
    \setlength\bibitemsep{\baselineskip}  
    \addcontentsline{toc}{chapter}{Bibliography}
    \printbibliography[title={References}]
\end{singlespace}

\end{document}
2
  • 1
    Your MWE doesn't compile, there are some errors and missing packages. Most of the errors can be resolved by making the MWE simpler, remove singlespace environmnets and title formats etc. Regarding your question: is there a reason you use bibtex as backend, instead of biber?
    – Marijn
    Jun 24, 2021 at 6:35
  • Specifically, it is possible to define a custom sorting scheme where you list the sorting order of the fields, where you can put shorttitle first. However, this is only supported with biber as backend.
    – Marijn
    Jun 24, 2021 at 6:46

1 Answer 1

2

With backend=bibtex, your options to customise the sorting are fairly limited. The only thing that is officially supported would be to set the sorttitle field (to the same value as shorttitle), but that requires additional work and causes data duplication.

\documentclass[12pt]{article}

\usepackage[
  backend=bibtex, 
  natbib=true,
  style=authoryear-comp,
  maxcitenames=2, 
  maxbibnames=99,
  citetracker=true,
  doi=false,
  url=false,
  isbn=false,
%  refsegment=chapter,
]{biblatex}


\ExecuteBibliographyOptions[incollection]{useeditor=false}
\DeclareNameAlias{sortname}{family-given} 

\AtEveryCitekey{\ifciteseen{}{\defcounter{maxnames}{6}}}

\DeclareListInputHandler{list}{\def\NewValue{}}

\AtEveryBibitem{%
  \ifentrytype{online}
    {}
    {\clearfield{urlyear}\clearfield{urlmonth}\clearfield{urlday}}}

\begin{filecontents}{\jobname.bib}
@report{example_1965_1,
  title      = {C This is an example report blah blah},
  shorttitle = {Example Report 1},
  sorttitle  = {Example Report 1},
  date       = {1965-08-27},
}
@report{example_1965_2,
  title      = {B This is an example report blah blah},
  shorttitle = {Example Report 2},
  sorttitle  = {Example Report 2},
  date       = {1965-08-29},
}
@report{example_1965_3,
  title      = {A This is an example report blah blah},
  shorttitle = {Example Report 3},
  sorttitle  = {Example Report 3},
  date       = {1965-08-28},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
blah blah \citep{example_1965_3} and \citep{example_1965_2} and \citep{example_1965_1}

\printbibliography[title={References}]
\end{document}

Example Report 1//Example Report 2//Example Report 3 in the bibliography


Unless you have a very good reason to stick with BibTeX I suggest you check out Biber. Change backend=bibtex, to backend=biber, and tell your editor to run Biber for you (Biblatex with Biber: Configuring my editor to avoid undefined citations).

With Biber it is almost trivial to change the selected sorting scheme nyt to also take into account the shorttitle field. We just need to insert \field{shorttitle} in the right place (the original definition can be found in ll. 1507-1534 of biblatex.def (v3.16)).

Note that Biber will complain about your date fields as they are not in valid ISO 8601 format. Month and day must be given with two digits (padded with zeros). So date = {1965-8-27}, should be date = {1965-08-27}, etc.

\documentclass[12pt]{article}

\usepackage[
  backend=biber, 
  natbib=true,
  style=authoryear-comp,
  maxcitenames=2, 
  maxbibnames=99,
  citetracker=true,
  doi=false,
  url=false,
  isbn=false,
%  refsegment=chapter,
]{biblatex}


\ExecuteBibliographyOptions[incollection]{useeditor=false}
\DeclareNameAlias{sortname}{family-given} 

\AtEveryCitekey{\ifciteseen{}{\defcounter{maxnames}{6}}}

\DeclareListInputHandler{list}{\def\NewValue{}}

\AtEveryBibitem{%
  \ifentrytype{online}
    {}
    {\clearfield{urlyear}\clearfield{urlmonth}\clearfield{urlday}}}

\DeclareSortingTemplate{nyt}{
  \sort{
    \field{presort}
  }
  \sort[final]{
    \field{sortkey}
  }
  \sort{
    \field{sortname}
    \field{author}
    \field{editor}
    \field{translator}
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field{sortyear}
    \field{year}
  }
  \sort{
    \field{sorttitle}
    \field{shorttitle}
    \field{title}
  }
  \sort{
    \field{volume}
    \literal{0}
  }
}

\begin{filecontents}[force]{\jobname.bib}
@report{example_1965_1,
  title      = {C This is an example report blah blah},
  shorttitle = {Example Report 1},
  date       = {1965-08-27},
}
@report{example_1965_2,
  title      = {B This is an example report blah blah},
  shorttitle = {Example Report 2},
  date       = {1965-08-29},
}
@report{example_1965_3,
  title      = {A This is an example report blah blah},
  shorttitle = {Example Report 3},
  date       = {1965-08-28},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
blah blah \citep{example_1965_3} and \citep{example_1965_2} and \citep{example_1965_1}

\printbibliography[title={References}]
\end{document}
3
  • Thanks for the suggestion to try with biber. You overestimate my competency though... there's only one biblatex.def on my system and for some reason I don't have permissions to edit it. Could you please elaborate on how to add the requisite line?
    – beddotcom
    Jun 24, 2021 at 17:49
  • 2
    @beddotcom Oh sorry for the confusion. Do not edit biblatex.def. It is enough to have the \DeclareSortingTemplate{nyt} in your preamble. The second code block works as-is without change to any already installed files. You can simply copy-and-paste the bits of the preamble into your own document and things should work (if you use Biber).
    – moewe
    Jun 24, 2021 at 17:54
  • I couldn't actually get this method to work with my live document and switching to biber caused more problems than it solved for me, but the first bibtex-compatible suggestion (though painstaking) worked. Just glad that the problem is solved! Hope moewe's kind answer is useful to others in the future.
    – beddotcom
    Jun 24, 2021 at 21:53

You must log in to answer this question.

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