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