% This file is embedded in glossaries-extra-manual.pdf % Example 154 Using bib2gls: gathering dependencies from field values % Label: "ex:bib2glsgatherdeps" % arara: pdflatex % arara: bib2gls % arara: pdflatex % arara: pdfcrop \documentclass[12pt]{article} \pagestyle{empty} \begin{filecontents*}{abbrvs.bib} @string{ssi={server-side includes}} @string{html={hypertext markup language}} @abbreviation{shtml, short="shtml", fulllong = ssi # " enabled " # html, nestedlong = "\glsps{ssi} enabled \glsps{html}", description={a combination of \gls{html} and \gls{ssi}} } @abbreviation{html, short ="html", long = html, description={a markup language for creating web pages} } @abbreviation{ssi, short="ssi", long = ssi, description={a simple interpreted server-side scripting language} } @abbreviation{xml, short={xml}, long={extensible markup language}, description={a simple text-base format for representing structured information} } @abbreviation{mathml, short={m\BibGlsNoCaseChange{ath}ml}, long={mathematical markup language}, description={an \gls{xml}-based language for describing mathematical notation} } \end{filecontents*} \usepackage[T1]{fontenc} \usepackage{relsize} \usepackage[colorlinks]{hyperref} \usepackage[record=nameref]{glossaries-extra} \BibGlsOptions{mfirstuc-protection={long}} \setabbreviationstyle{long-short-sc} \newcommand{\BibGlsNoCaseChange}[1]{\textsmaller{#1}} \GlsXtrLoadResources[ src={abbrvs}, field-aliases={fulllong=long}, % The following require bib2gls v4.1+ omit-fields={"description"}, gather-parsed-dependencies ] \begin{document} \tableofcontents \section{\Glsfmtlong{shtml}} First use: \gls{shtml}, \gls{html}, \gls{ssi}, \gls{mathml}. Next use: \gls{shtml}, \gls{html}, \gls{ssi}, \gls{mathml}. All caps: \GLS{mathml}. \printunsrtglossaries \end{document}