| 1 |
% arara: pdflatex |
| 2 |
% arara: bib2gls |
| 3 |
% arara: pdflatex |
| 4 |
\documentclass{article} |
| 5 |
|
| 6 |
\usepackage[colorlinks]{hyperref} |
| 7 |
\usepackage[record,% use bib2gls |
| 8 |
stylemods,% load glossaries-extra-stylemods.sty |
| 9 |
style=index]{glossaries-extra} |
| 10 |
|
| 11 |
\GlsXtrRecordCounter{section} |
| 12 |
|
| 13 |
% suppress the space that normally occurs before the locations: |
| 14 |
\renewcommand{\glsxtrprelocation}{} |
| 15 |
|
| 16 |
\GlsXtrLoadResources[ |
| 17 |
src={example-glossaries-brief},% entries defined in example-glossaries-brief.bib |
| 18 |
sort={en-GB},% sort according to en-GB locale |
| 19 |
%selection=all,% select all entries provided in the .bib file |
| 20 |
loc-prefix={{, page},{, pages}},% prefix for location list |
| 21 |
loc-suffix% suffix for location list |
| 22 |
] |
| 23 |
|
| 24 |
\begin{document} |
| 25 |
|
| 26 |
\section{Sample Section} |
| 27 |
\printunsrtglossaryunit[nonumberlist]{section} |
| 28 |
% or: |
| 29 |
%\printunsrtglossary*{\printunsrtglossaryunitsetup{section}% |
| 30 |
% \renewcommand*{\glossarysection}[2][]{\subsection*{Summary}}% |
| 31 |
%} |
| 32 |
|
| 33 |
\gls{dolor}, \gls{amet}. |
| 34 |
|
| 35 |
Check first use flag for `amet': \ifglsused{amet}{used}{not used}. |
| 36 |
Check first use flag for `lorem': \ifglsused{lorem}{used}{not used}. |
| 37 |
`Lorem' unused or undefined? \GlsXtrIfUnusedOrUndefined{lorem}{yes}{no}. |
| 38 |
|
| 39 |
See \url{https://ctan.org/pkg/bib2gls} for converting |
| 40 |
\texttt{.bib} to \texttt{.glstex} files. |
| 41 |
|
| 42 |
\section{Another Section} |
| 43 |
\printunsrtglossaryunit[nonumberlist]{section} |
| 44 |
|
| 45 |
\glspl{lorem}, \gls{amet}. |
| 46 |
|
| 47 |
`Lorem' unused or undefined? \GlsXtrIfUnusedOrUndefined{lorem}{yes}{no}. |
| 48 |
|
| 49 |
\printunsrtglossary |
| 50 |
|
| 51 |
\end{document} |