Feature Tracker RSS feed

ID 50🔗
Date: 2020-10-02 07:25:30
Status Open
Category glossaries-extra
Summary Add hints on embedding QRcodes in the glossary

Return to Search Results

Sign in to subscribe to notifications about this report.

Description

It would be nice to add a note in the doc on combining glossaries-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

Name (optional):

Are you human? Please confirm the feature request ID (which can be found at the top of this page) or login if you have an account. All guest comments have to be manually checked before they appear on the page. There are too many bots trying to spam the site to allow unauthenticated users to post without verification.

Comment:


You can use the following markup:

Block:

[pre]Displayed verbatim[/pre]
[quote]block quote[/quote]

In line:

[tt]code[/tt]
[file]file/package/class name[/file]
[em]emphasized text[/em]
[b]bold text[/b]
[url]web address[/url] [sup]superscript[/sup]
[sub]subscript[/sub]

Ordered list:
[ol]
[li]first item[/li]
[li]second item[/li]
[/ol]

Unordered list:
[ul]
[li]first item[/li]
[li]second item[/li]
[/ul]

You can use the Preview button to review your message formatting before submitting.

Page permalink: https://www.dickimaw-books.com/featuretracker.php?key=50

Return to Search Results