Debian Codegraph @

texmf-dist/doc/support/bib2gls/examples/sample-authors.tex

raw
1 % This file is public domain. See the "Examples" chapter
2 % in the bib2gls user manual for a more detailed description
3 % of this file.
4
5 \documentclass[12pt,a4paper]{article}
6
7 \usepackage[colorlinks]{hyperref}
8 \usepackage[record,% using bib2gls
9 nostyles,% don't load default styles
10 stylemods={bookindex},% load glossary-bookindex and patch styles
11 style=bookindex]{glossaries-extra}
12
13 \GlsXtrLoadResources[
14 src=no-interpret-preamble,
15 interpret-preamble=false
16 ]
17
18 \GlsXtrLoadResources[
19 src={interpret-preamble2,people,books},
20 write-preamble=false,
21 interpret-label-fields,
22 field-aliases={identifier=category,author=parent},
23 check-end-punctuation={name},
24 replicate-fields={name={first}}
25 ]
26
27 \newcommand*{\bookfont}[1]{\emph{#1}}
28 \glssetcategoryattribute{book}{textformat}{bookfont}
29 \glssetcategoryattribute{book}{glossnamefont}{bookfont}
30
31 % requires glossaries-extra v1.23
32 \renewcommand*{\glsxtrifcustomdiscardperiod}[2]{%
33 \GlsXtrIfFieldUndef{nameendpunc}{\glslabel}{#2}{#1}%
34 }
35
36 \begin{document}
37 \section{Sample}
38
39 \gls{ataleoftwocities}. \gls{bleakhouse}. \gls{thebigsleep}.
40 \gls{thelonggoodbye}. \gls{redharvest}.
41 \gls{murderontheorientexpress}. \gls{whydidnttheyaskevans}.
42 \gls{icecoldinalex}. \gls{thehobbit}. \gls{thelordoftherings}.
43 \gls{thewonderfulwizardofoz}. \gls{whiskygalore}.
44 \gls{whereeaglesdare}. \gls{icestationzebra}. \gls{ubik}.
45 \gls{doandroidsdreamofelectricsheep}. \gls{thetroublewithharry}.
46 \gls{brightonrock}.
47
48 \printunsrtglossary[title={Author and Book List}]
49
50 \end{document}