Feature Tracker 
| ID | 50🔗 |
|---|---|
| Date: | 2020-10-02 07:25:30 |
| Status | Open Sign in if you want to like this report. |
| Category | glossaries-extra |
| Summary | Add hints on embedding QRcodes in the glossary |
Sign in to subscribe to notifications about this report.
Description
It would be nice to add a note in the doc on combiningglossaries-extra / bib2gls with the qrcode package.
To create a qrcode enabled glossary:
% required packages
\usepackage{url}
\usepackage{qrcode}
\usepackage{marginnote}
% the qrcode enabled glossary style
\newglossarystyle{qrlist}% style name
{%
\setglossarystyle{list}% use list as base
% % main entries :
\renewcommand*{\glossentry}[2]{%
\item[\glsentryitem{##1}%
\glstarget{##1}{\glossentryname{##1}}]
% expect the url to be stored in the user1 field
\glsxtrifhasfield{useri}{##1}{%
\url{\glscurrentfieldvalue}% print the url in a pretty format
\vspace{2cm}% make sure the qrcodes are not overlapping
\marginnote{%
\qrcode[%
height=1.5cm,%
]{\glscurrentfieldvalue}%
}%
}{% false
}%
}%
}
To get the url into the user1 field the following can be done with bib2gls
\GlsXtrLoadResources[
src={%
webpages,% entries in a webpages.bib file
},%
entry-type-aliases={%
website=entry,%
},% needed for bib2gls to recognize entries
replicate-fields={%
url=user1,% load url into the user1 field
}, % copy the values
]
with webpages.bib containing
@website{dickimaw-books,
name={Dickimaw Books},
url={https://www.dickimaw-books.com},
}
MWE
No mwe.tex
Evaluation
There are a lot of packages that can be used with glossaries-extra and bib2gls. It would unfortunately clutter up the glossaries-extra manual to have them all there as that’s intended to just cover the additional commands and features not provided by the base glossaries package.
The bib2gls manual has a chapter of examples, so it could be added there, but I think it would be more useful to add it to the gallery (which is referenced at the start of both the glossaries and glossaries-extra documentation). Would you like me to add it to the bib2gls section?
Comments
0 comments.
Add Comment
Page permalink: https://www.dickimaw-books.com/featuretracker.php?key=50
