summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/glossaries-extra/sample-record.tex
blob: 81606978af8a2c38b5160e8acc952e3eec758173 (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
% arara: pdflatex
% arara: bib2gls
% arara: pdflatex
\documentclass{article}

\usepackage[colorlinks]{hyperref}
\usepackage[record,% use bib2gls
 stylemods,% load glossaries-extra-stylemods.sty
 style=index]{glossaries-extra}

\GlsXtrRecordCounter{section}

% suppress the space that normally occurs before the locations:
\renewcommand{\glsxtrprelocation}{}

\GlsXtrLoadResources[
   src={example-glossaries-brief},% entries defined in example-glossaries-brief.bib
   sort={en-GB},% sort according to en-GB locale
   %selection=all,% select all entries provided in the .bib file
   loc-prefix={{, page},{, pages}},% prefix for location list
   loc-suffix% suffix for location list
 ]

\begin{document}

\section{Sample Section}
\printunsrtglossaryunit[nonumberlist]{section}
% or:
%\printunsrtglossary*{\printunsrtglossaryunitsetup{section}%
%  \renewcommand*{\glossarysection}[2][]{\subsection*{Summary}}%
%}

\gls{dolor}, \gls{amet}.

See \url{https://ctan.org/pkg/bib2gls} for converting
\texttt{.bib} to \texttt{.glstex} files.

\section{Another Section}
\printunsrtglossaryunit[nonumberlist]{section}

\glspl{lorem}, \gls{amet}.

\printunsrtglossary

\end{document}