Debian Codegraph @

texmf-dist/doc/latex/datatool/datatool-user-examples/datatool-user-example186.tex

raw
1 % This file is embedded in datatool-user.pdf version 3.4.3 2025-12-04
2 % Example 186 Five Most Recent Publications
3 % Label: "ex:topnbib"
4 % arara: pdflatex
5 % arara: bibtex
6 % arara: pdflatex
7 % arara: pdfcrop
8 \documentclass[12pt]{article}
9 \pagestyle{empty}
10 \begin{filecontents}[noheader,overwrite]{sample1.bib}
11 @STRING{TUGBOAT = {TUGboat}}
12 @STRING{PRACTEX = {The Prac\TeX\ Journal}}
13 @ARTICLE{Flom2005,
14 author = {Peter Flom and Hans Hagen and Joe Hogg and Nicola Talbot and Philip Taylor and Christina Thiele and David Walden},
15 title = {What is {\TeX}?},
16 journal = PRACTEX,
17 year = 2005,
18 volume = 3,
19 url = {http://tug.org/pracjourn/2005-3/walden-whatis}
20 }
21 @ARTICLE{tugboat2016,
22 title = "Localisation of {\TeX} documents: tracklang",
23 author = "Nicola Talbot",
24 month = NOV,
25 year = 2016,
26 volume = 37,
27 number = 3,
28 journal = TUGBOAT,
29 url = "http://www.tug.org/TUGboat/tb37-3/tb117talbot.pdf"
30 }
31 @ARTICLE{tugboat2022,
32 title = "bib2gls: Standalone entries and repeated lists (a little book of poisons)",
33 author = "Nicola Talbot",
34 month = APR,
35 year = 2022,
36 volume = 43,
37 number = 1,
38 journal = TUGBOAT,
39 doi = {10.47397/tb/43-1/tb133talbot-bib2gls-reorder},
40 url = "https://tug.org/TUGboat/tb43-1/tb133talbot-bib2gls-reorder.pdf"
41 }
42 @BOOK{Talbot2012a,
43 title = {{\LaTeX} for Complete Novices},
44 publisher = {Dickimaw Books},
45 year = 2012,
46 month = SEP,
47 author = {Nicola L C Talbot},
48 volume = 1,
49 series = {Dickimaw {\LaTeX} Series},
50 isbn = {978-1-909440-00-5},
51 url = {https://www.dickimaw-books.com/latex/novices/}
52 }
53 @INPROCEEDINGS{Talbot2020,
54 author = {Nicola L C Talbot},
55 title = {Sorting Glossaries with bib2gls},
56 booktitle = {{LaTeX}.net},
57 year = 2020,
58 month = JUL,
59 url = {https://latex.net/sorting-glossaries-with-bib2gls/}
60 }
61 @BOOK{Talbot2013a,
62 title = {Using {\LaTeX} to Write a {PhD} Thesis},
63 publisher = {Dickimaw Books},
64 year = 2013,
65 month = MAR,
66 author = {Nicola L C Talbot},
67 volume = 2,
68 series = {Dickimaw {\LaTeX} Series},
69 isbn = {978-1-909440-02-9},
70 url = {http://www.dickimaw-books.com/latex/thesis/}
71 }
72 @INPROCEEDINGS{Talbot2012c,
73 author = {Nicola L C Talbot},
74 title = {Creating a glossary without using an external indexing application},
75 booktitle = {{LaTeX}.net},
76 year = 2012,
77 month = SEP,
78 url = {https://latex.net/glossary-without-external-app/},
79 note={Originally posted on the {\LaTeX} Community's Know How Section}
80 }
81 @BOOK{Talbot2014a,
82 title = {{\LaTeX} for Administrative Work},
83 publisher = {Dickimaw Books},
84 month = SEP,
85 year = 2014,
86 author = {Nicola L C Talbot},
87 volume = 3,
88 series = {Dickimaw {\LaTeX} Series},
89 isbn = {978-1-909440-07-4},
90 url = {https://www.dickimaw-books.com/latex/admin/}
91 }
92 @BOOK{Talbot2013b,
93 title = {Quack, Quack, Quack. Give My Hat Back!},
94 publisher = {Dickimaw Books},
95 year = 2013,
96 month = MAY,
97 author = {Nicola L C Talbot and Magdalene Pritchett},
98 isbn = {978-1-909440-03-6},
99 url = {https://www.dickimaw-books.com/fiction/kids/duck/}
100 }
101 @BOOK{Talbot2012b,
102 title = {The Foolish Hedgehog},
103 publisher = {Dickimaw Books},
104 year = 2012,
105 month = NOV,
106 author = {Nicola L C Talbot and Magdalene Pritchett},
107 isbn = {978-1-909440-01-2},
108 url = {https://www.dickimaw-books.com/fiction/kids/hedgehog/}
109 }
110 \end{filecontents}
111 \usepackage{databib}
112 \usepackage{url}
113 \DTLloadbbl{mybib}{sample1}
114 \DTLsortdata{mybib}{Year=descending,Month=descending}
115 \renewcommand{\DTLendbibitem}{%
116 \DTLifbibfieldexists{ISBN}%
117 { ISBN: \DTLbibfield{ISBN}.}{}%
118 \DTLifbibfieldexists{Url}%
119 { \DTLencapbibfield{\url}{Url}}{}%
120 }
121 \begin{document}
122 \nocite{*}
123 \DTLbibliography[\value{DTLbibrow}<5]{mybib}
124 \end{document}