1

Does anyone know how to create a "List of QR Codes"? I use QR codes all over a document and now I want to list them just like the "List of Figures" lists all figures.

I use:

\usepackage{qrcode}

Example:

Google search engine \quad
\qrcode{www.google.com}
TeXnician
  • 33,589
Marc
  • 11
  • 1
    Welcome to TeX.SX! Please make a minimal, but compilable code example and be more specific how your list should look like to help us help you. – TeXnician Aug 14 '18 at 12:16

1 Answers1

1

Here is a method that uses the package tocloft, as explained here : https://texblog.org/2008/07/13/define-your-own-list-of/. If you want to change the qrcode display, for example if don't want to display the QRCode number, change the line \par\noindent\textbf{QRCode \themyqrcode:\\}\qrcode{#1} to your needs, like \qrcode{#1}:

\documentclass{report}
\usepackage{tocloft}
\usepackage[english]{babel}
\usepackage{qrcode}
\newcommand{\listmyqrcodename}{List of QRCodes}
\newlistof{myqrcode}{exp}{\listmyqrcodename}
\newcommand{\myqrcode}[1]{%
  \refstepcounter{myqrcode}
  \par\noindent\textbf{QRCode \themyqrcode:\\}\qrcode{#1}
  \addcontentsline{exp}{myqrcode}
                  {\protect\numberline{\thechapter.\themyqrcode}#1}\par}
\begin{document}
\tableofcontents
\newpage
\listofmyqrcode
\chapter{Two QRCodes}
\myqrcode{www.google.com}
\label{1st_ex}
\myqrcode{https://tex.stackexchange.com/questions/446004/list-of-qr-codes}
\label{2nd_ex}
\chapter{One example}
See qrcode \ref{1st_ex} and \ref{2nd_ex}.
\end{document}
tobiasBora
  • 8,684