% This file is embedded in datatool-user.pdf version 3.4.5 2026-08-23
% Example 184 Tabulate Bib Data
% Label: "ex:bibtable"
% arara: pdflatex
% arara: bibtex
% arara: pdflatex
% arara: pdfcrop
\documentclass[10pt]{article}
\pagestyle{empty}
\begin{filecontents}[noheader,overwrite]{sample2.bib}
@Article{duck2018,
 Author = {Dickie Duck and José Arara and Polly Parrot},
 Title = {Avian Friendship},
 Journal = {Fowl Times},
 Year = 2018,
 Volume = 7,
 Number = 5,
 Pages = "1032--5"
}
@BOOK{duck2016,
 AUTHOR = {Dickie Duck},
 TITLE = {Feathered stunt doubles: \emph{The Birds} and other films},
 PUBLISHER = {Duck Duck Goose},
 YEAR = 2016
}
@book{macaw,
 author = {Prof Macaw},
 title = {Annotated notes on the \emph{Duck and Goose} chronicles},
 publisher = {Duck Duck Goose},
 year = 2012
 }
@inproceedings{parrot2021a,
 author = {Polly Parrot},
 title = {Who's a Pretty Polly? {T}he surge of avian chatbots},
 booktitle = {Avian Intelligence},
 month = jan,
 year = 2021
}
@inproceedings{parrot2021b,
 author = {Polly Parrot},
 title = {Pollybot: the next generation in avian translators},
 booktitle = {Avian Advances},
 month = apr,
 year = 2021
}
@phdthesis{ing2020,
 author = {Bor Ing},
 title = {\emph{Duck and Goose}: an allegory for modern times?},
 school = {Department of Literature, University of Somewhere},
 month = mar,
 year = 2010
}
@booklet{parrots2013,
 author = {Polly Parrot and Dickie Duck},
 title = {\emph{Duck and Goose} Cheat Sheet},
 howpublished = {Limited print run},
 address = {Dubious Student Resources},
 year = 2013
}
@book{parrot2012,
 author = {von Parrot, Jr, Ann},
 title = {My Friend is a Duck},
 publisher = {Duck Duck Goose},
 year = 2012,
}
@book{quackalot,
 author = {Sir Quackalot},
 title = {The Adventures of Duck and Goose},
 publisher = {Duck Duck Goose},
 year = 2011
}
@techreport{zebra2022,
 author = {Zoë Zebra and Mabel Canary},
 title = {Health and Safety when Handling Mind-Controlling Cookies},
 institution = {Secret Lab of Experimental Stuff},
 month = {22 } # MAR,
 year = 2014
}
@manual{canary2015,
 author = {Mabel Canary},
 title = {Ray Gun User Guide},
 organization = {Secret Lab of Experimental Stuff},
 edition = "2nd",
 year = 2015
}
@book{fan1992,
 author = {Éli-Fant, Nellie},
 title = {The Duckinator},
 publisher = {Duck Duck Goose},
 year = 1992,
 note = {A cyborg from the future travels to the past to scramble some eggs.}
}
@misc{henpecked,
 title = {Henpecked: Time for a Coup in the Coop!},
 howpublished = {Flyer}
} 
\end{filecontents}
\usepackage[style=abbrv,locales=en]{databib} 
\begin{document}
\nocite{*}
\DTLloadbbl{mybib}{sample2}
\DTLsortdata{mybib}{Author={replacements=Title},Title}
\RenewDocumentCommand\DTLdisplaydbAddItem{ m m m m m m m m }
{% 
 \DTLifnull{#2}% 
 {\appto#1{---}}% do a dash if null
 {% 
   \ifnum#7=1 
    \appto#1{\DTLformatbibnamelist {#2}{\value{DTLmaxauthors}}{\DTLformatauthor}}% 
   \else 
    \appto#1{#3{#2}}% 
   \fi 
 }% 
}
\DTLdisplaydb*[only-keys={Author,Title}]{mybib} 
\end{document}
