| 1 |
% This file is embedded in datatool-user.pdf version 3.4.3 2025-12-04 |
| 2 |
% Example 184 Tabulate Bib Data |
| 3 |
% Label: "ex:bibtable" |
| 4 |
% arara: pdflatex |
| 5 |
% arara: bibtex |
| 6 |
% arara: pdflatex |
| 7 |
% arara: pdfcrop |
| 8 |
\documentclass[10pt]{article} |
| 9 |
\pagestyle{empty} |
| 10 |
\begin{filecontents}[noheader,overwrite]{sample2.bib} |
| 11 |
@Article{duck2018, |
| 12 |
Author = {Dickie Duck and José Arara and Polly Parrot}, |
| 13 |
Title = {Avian Friendship}, |
| 14 |
Journal = {Fowl Times}, |
| 15 |
Year = 2018, |
| 16 |
Volume = 7, |
| 17 |
Number = 5, |
| 18 |
Pages = "1032--5" |
| 19 |
} |
| 20 |
@BOOK{duck2016, |
| 21 |
AUTHOR = {Dickie Duck}, |
| 22 |
TITLE = {Feathered stunt doubles: \emph{The Birds} and other films}, |
| 23 |
PUBLISHER = {Duck Duck Goose}, |
| 24 |
YEAR = 2016 |
| 25 |
} |
| 26 |
@book{macaw, |
| 27 |
author = {Prof Macaw}, |
| 28 |
title = {Annotated notes on the \emph{Duck and Goose} chronicles}, |
| 29 |
publisher = {Duck Duck Goose}, |
| 30 |
year = 2012 |
| 31 |
} |
| 32 |
@inproceedings{parrot2021a, |
| 33 |
author = {Polly Parrot}, |
| 34 |
title = {Who's a Pretty Polly? {T}he surge of avian chatbots}, |
| 35 |
booktitle = {Avian Intelligence}, |
| 36 |
month = jan, |
| 37 |
year = 2021 |
| 38 |
} |
| 39 |
@inproceedings{parrot2021b, |
| 40 |
author = {Polly Parrot}, |
| 41 |
title = {Pollybot: the next generation in avian translators}, |
| 42 |
booktitle = {Avian Advances}, |
| 43 |
month = apr, |
| 44 |
year = 2021 |
| 45 |
} |
| 46 |
@phdthesis{ing2020, |
| 47 |
author = {Bor Ing}, |
| 48 |
title = {\emph{Duck and Goose}: an allegory for modern times?}, |
| 49 |
school = {Department of Literature, University of Somewhere}, |
| 50 |
month = mar, |
| 51 |
year = 2010 |
| 52 |
} |
| 53 |
@booklet{parrots2013, |
| 54 |
author = {Polly Parrot and Dickie Duck}, |
| 55 |
title = {\emph{Duck and Goose} Cheat Sheet}, |
| 56 |
howpublished = {Limited print run}, |
| 57 |
address = {Dubious Student Resources}, |
| 58 |
year = 2013 |
| 59 |
} |
| 60 |
@book{parrot2012, |
| 61 |
author = {von Parrot, Jr, Ann}, |
| 62 |
title = {My Friend is a Duck}, |
| 63 |
publisher = {Duck Duck Goose}, |
| 64 |
year = 2012, |
| 65 |
} |
| 66 |
@book{quackalot, |
| 67 |
author = {Sir Quackalot}, |
| 68 |
title = {The Adventures of Duck and Goose}, |
| 69 |
publisher = {Duck Duck Goose}, |
| 70 |
year = 2011 |
| 71 |
} |
| 72 |
@techreport{zebra2022, |
| 73 |
author = {Zoë Zebra and Mabel Canary}, |
| 74 |
title = {Health and Safety when Handling Mind-Controlling Cookies}, |
| 75 |
institution = {Secret Lab of Experimental Stuff}, |
| 76 |
month = {22 } # MAR, |
| 77 |
year = 2014 |
| 78 |
} |
| 79 |
@manual{canary2015, |
| 80 |
author = {Mabel Canary}, |
| 81 |
title = {Ray Gun User Guide}, |
| 82 |
organization = {Secret Lab of Experimental Stuff}, |
| 83 |
edition = "2nd", |
| 84 |
year = 2015 |
| 85 |
} |
| 86 |
@book{fan1992, |
| 87 |
author = {Éli-Fant, Nellie}, |
| 88 |
title = {The Duckinator}, |
| 89 |
publisher = {Duck Duck Goose}, |
| 90 |
year = 1992, |
| 91 |
note = {A cyborg from the future travels to the past to scramble some eggs.} |
| 92 |
} |
| 93 |
@misc{henpecked, |
| 94 |
title = {Henpecked: Time for a Coup in the Coop!}, |
| 95 |
howpublished = {Flyer} |
| 96 |
} |
| 97 |
\end{filecontents} |
| 98 |
\usepackage[style=abbrv,locales=en]{databib} |
| 99 |
\begin{document} |
| 100 |
\nocite{*} |
| 101 |
\DTLloadbbl{mybib}{sample2} |
| 102 |
\DTLsortdata{mybib}{Author={replacements=Title},Title} |
| 103 |
\RenewDocumentCommand\DTLdisplaydbAddItem{ m m m m m m m m } |
| 104 |
{% |
| 105 |
\DTLifnull{#2}% |
| 106 |
{\appto#1{---}}% do a dash if null |
| 107 |
{% |
| 108 |
\ifnum#7=1 |
| 109 |
\appto#1{\DTLformatbibnamelist {#2}{\value{DTLmaxauthors}}{\DTLformatauthor}}% |
| 110 |
\else |
| 111 |
\appto#1{#3{#2}}% |
| 112 |
\fi |
| 113 |
}% |
| 114 |
} |
| 115 |
\DTLdisplaydb*[only-keys={Author,Title}]{mybib} |
| 116 |
\end{document} |