TransWikia.com

Rearrange references in the bibliography

TeX - LaTeX Asked by LaNoTUM on July 15, 2021

I need help with rearranging exactly one pair of references in my bibliography. 🙂

Currently, my bibliography is arranged alphabetically, which is the right format.
Some author published a correction of a published paper at the same year and my supervisor asked me to rearrange the two citations. So the first published paper should have the index a.

See the following MWE:

documentclass{article}
usepackage[utf8]{inputenc}

RequirePackage{filecontents}
begin{filecontents}{bib.bib}
@article{Williamson.1968,
 author = {Williamson, Oliver E.},
 year = {1968},
 title = {Economies as an Antitrust Defense: The Welfare Tradeoffs},
}
@article{Williamson.1968b,
 author = {Williamson, Oliver E.},
 year = {1968},
 title = {Economies as an Antitrust Defense: Correction and Reply},
}
end{filecontents}

usepackage[authordate,strict,backend=biber,bibencoding=inputenc]{biblatex-chicago} 
addbibresource{bib.bib}

begin{document}
This is the first citation parencite{Williamson.1968}.
In the same year, a correction was published parencite{Williamson.1968b}.

vspace{5 cm}
printbibliography

end{document}

Thank you very much!
Best regards!

2 Answers

I would use sorttitle = {Economies as an Antitrust Defense} in the first publication.

documentclass{article}
usepackage[utf8]{inputenc}

begin{filecontents}[overwrite]{jobname.bib}
 @article{Williamson.1968,
  author = {Williamson, Oliver E.},
  year = {1968},
  title = {Economies as an Antitrust Defense: The Welfare Tradeoffs},
  sorttitle = {Economies as an Antitrust Defense},
 }
 @article{Williamson.1968b,
  author = {Williamson, Oliver E.},
  year = {1968},
  title = {Economies as an Antitrust Defense: Correction and Reply},
 }
end{filecontents}

usepackage[authordate,strict,backend=biber,bibencoding=inputenc]{biblatex-chicago} 
addbibresource{jobname.bib}

begin{document}
 This is the first citation parencite{Williamson.1968}.
 In the same year, a correction was published parencite{Williamson.1968b}.
 
 vspace{5 cm}
 printbibliography
 
end{document}

enter image description here

Correct answer by Ivan on July 15, 2021

I suggest you use the noopsort trick that works with both bibtex and biber. The macro is defined as

providecommandnoopsort[1]{}

This seems like a trivial command, which takes one argument and outputs nothing via LaTeX. But it's not useless, as it can be used to influence how bibtex and biber sort entries. In the code below, observe the noopsort{a} and noopsort{b} instructions at the start of the entries' respective title fields. Since the biblatex-chicago style sorts entries by the author, year, and title fields, the noopsort directives let you achieve your formatting goal.

The noopsort trick is very versatile and has many possible uses. See, for instance, Put Chinese-language entries before English-language entries in the bibliography for an example of how to use noopsort to place, you guessed it, all Chinese-language entries before the other entries in the bibliography.

enter image description here

documentclass{article}
%%usepackage[utf8]{inputenc} % that's the default nowadays
providecommandnoopsort[1]{}

begin{filecontents}[overwrite]{bib.bib}
@article{Williamson.1968a,
 author = {Williamson, Oliver E.},
 year = {1968},
 title = {noopsort{a}Economies as an Antitrust Defense: The Welfare Tradeoffs},
}
@article{Williamson.1968b,
 author = {Williamson, Oliver E.},
 year = {1968},
 title = {noopsort{b}Economies as an Antitrust Defense: Correction and Reply},
}
end{filecontents}

usepackage[authordate,strict,backend=biber,bibencoding=inputenc]{biblatex-chicago} 
addbibresource{bib.bib}

begin{document}
This is the first citation parencite{Williamson.1968a}.
In the same year, a correction was published parencite{Williamson.1968b}.

printbibliography
end{document}

Answered by Mico on July 15, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP