summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/fancyqr
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-10-06 03:00:57 +0000
committerNorbert Preining <norbert@preining.info>2024-10-06 03:00:57 +0000
commitf2a810815e243250cf2d0785da7f58e5ad03f08f (patch)
tree9e41d0243030aa3bd391e999ae3583e06d3a9daf /graphics/pgf/contrib/fancyqr
parent63d313047f21c69a230478382d4a0cd2f2a17be5 (diff)
CTAN sync 202410060300
Diffstat (limited to 'graphics/pgf/contrib/fancyqr')
-rw-r--r--graphics/pgf/contrib/fancyqr/README.md40
-rw-r--r--graphics/pgf/contrib/fancyqr/fancyqr-doc.pdfbin247479 -> 262328 bytes
-rw-r--r--graphics/pgf/contrib/fancyqr/fancyqr-doc.tex23
-rw-r--r--graphics/pgf/contrib/fancyqr/fancyqr-style-blobs.code6
-rw-r--r--graphics/pgf/contrib/fancyqr/fancyqr-style-dots.code2
-rw-r--r--graphics/pgf/contrib/fancyqr/fancyqr-style-swift.code2
-rw-r--r--graphics/pgf/contrib/fancyqr/fancyqr.sty110
-rw-r--r--graphics/pgf/contrib/fancyqr/qr-example.tex12
-rw-r--r--graphics/pgf/contrib/fancyqr/qr-minimal.tex12
9 files changed, 127 insertions, 80 deletions
diff --git a/graphics/pgf/contrib/fancyqr/README.md b/graphics/pgf/contrib/fancyqr/README.md
index 63432f93e0..ed09e369ce 100644
--- a/graphics/pgf/contrib/fancyqr/README.md
+++ b/graphics/pgf/contrib/fancyqr/README.md
@@ -5,7 +5,7 @@
[<img src="https://github.com/EagleoutIce/fancyqr/blob/gh-pages/preview-1.png?raw=true" width="600"/>](qr-example.tex)
A simple package to create fancy qr-codes with the help of the [`qrcode`][qrcode]-package.
-You may use `\fancyqr` just like the normal `\qrcode` (`\fancyqr[<qr-options>]{<url>}`). See the [documentation](https://media.githubusercontent.com/media/EagleoutIce/fancyqr/gh-pages/build/fancyqr-doc.pdf).
+You may use `\fancyqr` just like the normal `\qrcode` (`\fancyqr[<qr-options>]{<url>}`). See the [documentation](https://media.githubusercontent.com/media/EagleoutIce/fancyqr/gh-pages/build/fancyqr-doc.pdf). If you just want to create a simple qr-code, please refer to the [minimal example](qr-minimal.tex).
*fancyqr* is actively developed by *Florian Sihler* (contact me at: <florian.sihler@uni-ulm.de>) under the [GPLv3 License](LICENSE). I am very happy about every contribution (see [CONTRIBUTING.md](CONTRIBUTING.md)). You can find it on CTAN (<https://www.ctan.org/pkg/fancyqr>).
@@ -13,22 +13,28 @@ If you do want to hide a center square (e.g., because you want to embed an image
At the moment, there are six other styles (`flat`, `frame`, `blobs`, `glitch`, and `dots`) that you can load (locally) by using `\FancyQrLoad{<name>}`. The default style is named `default` and can be 'reset' by `\FancyQrLoad{default}` or `\FancyQrLoadDefault`.
There are the following extra qr-options (you can set all of them with `\fancyqrset{<keys>}`):
-| Option | Type | Default | Explanation |
-| ----------------- | ------- | :------: | ---------------------------------------------------------- |
-| `image` | LaTeX | | Automatically center an image.[^1] |
-| `image padding` | number | | Additionally hide blocks (x & y) around the image. |
-| `image x padding` | number | `0` | Additionally hide blocks (x) around the image. |
-| `image y padding` | number | `0` | Additionally hide blocks (y) around the image. |
-| `gradient` | boolean | true | Toggle the color gradient |
-| `color` | color | | Disables the `gradient` and sets the qr color accordingly. |
-| `l color` | color | `purple` | Set the top left gradient color. |
-| `left color` | color | | Alias for `l color`. |
-| `r color` | color | `teal` | Set the bottom right gradient color. |
-| `right color` | color | | Alias for `r color`. |
-| `gradient angle` | angle | `135` | Change the gradient angle. |
-| `random color` | colors | | Allow to set a random color pool to pick from. |
-| `width` | length | | Alias for [`qrcode`'s][qrcode] `height` option. |
-| `size` | length | | Alias for [`qrcode`'s][qrcode] `height` option. |
+
+| Option | Type | Default | Explanation |
+| ----------------- | ----------- | :------: | ------------------------------------------------------------------------------------------------------------------------------------------ |
+| `classic` | boolean | `false` | Use the classic qr-code style (black with flat rectangles, this loads the `flat` style). |
+| `color` | color | | Disables the `gradient` and sets the qr color accordingly. |
+| `gradient angle` | angle | `135` | Change the gradient angle. |
+| `gradient` | boolean | true | Toggle the color gradient |
+| `image` | LaTeX | | Automatically center an image (you have to care for the size and maybe adjust the `version` and `level` to keep the qr-code readable).[^1] |
+| `image padding` | number | | Additionally hide blocks (x & y) around the image. |
+| `image x padding` | number | `0` | Additionally hide blocks (x) around the image. |
+| `image y padding` | number | `0` | Additionally hide blocks (y) around the image. |
+| `l color` | color | `purple` | Set the top left gradient color. |
+| `left color` | color | | Alias for `l color`. |
+| `level` | L/M/Q/H | `M` | [`qrcode`][qrcode] option affecting error correction (low, medium, quartile, high). |
+| `padding` | flag | | [`qrcode`][qrcode] option adding sufficient additional space around the qr-code. |
+| `r color` | color | `teal` | Set the bottom right gradient color. |
+| `random color` | colors | | Allow to set a random color pool to pick from. |
+| `right color` | color | | Alias for `r color`. |
+| `size` | length | | Alias for [`qrcode`'s][qrcode] `height` option. |
+| `tight` | flag | | [`qrcode`][qrcode] option adding no additional space around the qr-code. |
+| `version` | [0..40] ∈ ℕ | `0` | [`qrcode`][qrcode] option affecting the size (tries to be as small as possible). |
+| `width` | length | | Alias for [`qrcode`'s][qrcode] `height` option. |
The defaults are set like this:
diff --git a/graphics/pgf/contrib/fancyqr/fancyqr-doc.pdf b/graphics/pgf/contrib/fancyqr/fancyqr-doc.pdf
index c96c62abbc..cccceaca24 100644
--- a/graphics/pgf/contrib/fancyqr/fancyqr-doc.pdf
+++ b/graphics/pgf/contrib/fancyqr/fancyqr-doc.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/fancyqr/fancyqr-doc.tex b/graphics/pgf/contrib/fancyqr/fancyqr-doc.tex
index 1f3b00ba2d..52338832c5 100644
--- a/graphics/pgf/contrib/fancyqr/fancyqr-doc.tex
+++ b/graphics/pgf/contrib/fancyqr/fancyqr-doc.tex
@@ -18,6 +18,7 @@
\usepackage{fancyqr}
\usepackage{xcolor}
\usepackage[tex]{listings}
+\usepackage{amssymb}
\lstdefinelanguage{ltx}{
language={[LaTeX]TeX},
@@ -34,14 +35,13 @@
\texorpdfstring{Florian Sihler\medskip\\*
\fancyqr{https://github.com/EagleoutIce/fancyqr}
}{Florian Sihler}}
-\date{Version v2.0 \textendash{} 2024/04/13}
-
+\date{Version v2.1 \textendash{} 2024/10/05}
\begin{document}
\maketitle
- \texttt{fancyqr} is a simple package to create fancy qr codes with the help of the \textit{\href{https://www.ctan.org/pkg/qrcode}{qrcode}}-package.
+ \texttt{fancyqr} is a simple package to create fancy qr-codes with the help of the \textit{\href{https://www.ctan.org/pkg/qrcode}{qrcode}}-package.
You can use the |\fancyqr|-macro just like the normal |\qrcode|.\footnote{\ltx{\\fancyqr[<qr-options>]\{<url>\}}}
If you do want to hide a center square (e.g, because you want to embed an image) you can use |\FancyQrDoNotPrintSquare{<x>}{<y>}| to hide a rectangle with radius x and y set from the center. If you choose this option, the default |\FancyQrRoundCut| that rounds cut corners can be changed with |\FancyQrHardCut|.
@@ -66,20 +66,25 @@
\toprule
\multicolumn{1}{l}{Option} & Type & \multicolumn{1}{c}{Default} & Explanation \\
\midrule
- image & \LaTeX & & Automatically center an image.\footnote{The package will automatically calculate the required \ltx{\\FancyQrDoNotPrintSquare} (you have to make sure that the qr code still has enough information to be readable). Therefore, the image will not scale with the qr code.} \\
+ classic & boolean & false & Use the classic qr-code style (black with flat rectangles, this loads the |flat| style). \\
+ color & color & & Disables the |gradient| and sets the color accordingly. \\
+ gradient & boolean & true & Toggle the color gradient \\
+ gradient angle & angle & 135 & Change the gradient angle. \\
+ image & \LaTeX & & Automatically center an image (you have to care for the size and maybe adjust the |version| and |level| to keep the qr-code readable).\footnote{The package will automatically calculate the required \ltx{\\FancyQrDoNotPrintSquare} (you have to make sure that the qr-code still has enough information to be readable). Therefore, the image will not scale with the qr-code.} \\
image padding & number & & Additionally hide blocks (x \& y) around the image. \\
image x padding & number & 0 & Additionally hide blocks (x) around the image. \\
image y padding & number & 0 & Additionally hide blocks (y) around the image. \\
- gradient & boolean & true & Toggle the color gradient \\
- color & color & & Disables the |gradient| and sets the color accordingly. \\
l color & color & purple & Set the top left gradient color. \\
left color & color & & Alias for |l color|. \\
+ level & L/M/Q/H & M & |qrcode| option affecting error correction (low, medium, quartile, high). \\
+ padding & flag & & |qrcode| option adding sufficient additional space around the qr-code. \\
r color & color & teal & Set the bottom right gradient color. \\
- right color & color & & Alias for |r color|. \\
- gradient angle & angle & 135 & Change the gradient angle. \\
random color & colors & & Allow to set a random color pool to pick from. \\
- width & length & & Alias for |qrcode|'s |height| option. \\
+ right color & color & & Alias for |r color|. \\
size & length & & Alias for |qrcode|'s |height| option. \\
+ tight & flag & & |qrcode| option adding no additional space around the qr-code. \\
+ version & \([0..40] \in \mathbb{N}\) & 0 & |qrcode| option affecting the size (tries to be as small as possible). \\
+ width & length & & Alias for |qrcode|'s |height| option. \\
\bottomrule
\end{tabular}
\caption{Overview of special qr-options.}
diff --git a/graphics/pgf/contrib/fancyqr/fancyqr-style-blobs.code b/graphics/pgf/contrib/fancyqr/fancyqr-style-blobs.code
index bfc7e776ec..9746c52376 100644
--- a/graphics/pgf/contrib/fancyqr/fancyqr-style-blobs.code
+++ b/graphics/pgf/contrib/fancyqr/fancyqr-style-blobs.code
@@ -3,11 +3,11 @@
\@tempcnta=\z@
\roundjoin
\roundcap
-\moveto(0,0)
+\moveto(.5,.5)
\loop
\advance\@tempcnta by 30
-\edef\rad{\fpeval{.2*\qr@modulesize+.115*\qr@modulesize*abs(rand())}}% fixed rand for both
-\lineto(\fpeval{cos(\@tempcnta)*\rad},\fpeval{sin(\@tempcnta)*\rad})
+\edef\rad{\fpeval{.1*\qr@modulesize+.13*\qr@modulesize*abs(rand())}}% fixed rand for both
+\lineto(\fpeval{cos(\@tempcnta)*\rad+.5},\fpeval{sin(\@tempcnta)*\rad+.5})
\ifnum\@tempcnta<360\relax
\repeat
\fillpath
diff --git a/graphics/pgf/contrib/fancyqr/fancyqr-style-dots.code b/graphics/pgf/contrib/fancyqr/fancyqr-style-dots.code
index f7fd55e139..ced7e7a720 100644
--- a/graphics/pgf/contrib/fancyqr/fancyqr-style-dots.code
+++ b/graphics/pgf/contrib/fancyqr/fancyqr-style-dots.code
@@ -1,4 +1,4 @@
-\def\fancyqr@dots@circle{\put(.5,.5){\circle*{\@ne}}}
+\def\fancyqr@dots@circle{\put(.5,.5){\circle*{\@ne}}}%
% .
\newpattern0000{\fancyqr@dots@circle}%
% | | - -
diff --git a/graphics/pgf/contrib/fancyqr/fancyqr-style-swift.code b/graphics/pgf/contrib/fancyqr/fancyqr-style-swift.code
deleted file mode 100644
index 529213f04f..0000000000
--- a/graphics/pgf/contrib/fancyqr/fancyqr-style-swift.code
+++ /dev/null
@@ -1,2 +0,0 @@
-\PackageWarning{fancyqr}{Currently, swift is not supported :/}
-\FancyQrLoadDefault \ No newline at end of file
diff --git a/graphics/pgf/contrib/fancyqr/fancyqr.sty b/graphics/pgf/contrib/fancyqr/fancyqr.sty
index bb2b9f3ebb..200fa7f371 100644
--- a/graphics/pgf/contrib/fancyqr/fancyqr.sty
+++ b/graphics/pgf/contrib/fancyqr/fancyqr.sty
@@ -2,7 +2,7 @@
% Licensed under GNU General Public License version 3
% https://opensource.org/licenses/gpl-3.0.html
\def\filename{fancyqr}
-\ProvidesPackage{\filename}[2024/04/13 version v2.0 Fancy QR-Codes]
+\ProvidesPackage{\filename}[2024/10/05 version v2.1 Fancy QR-Codes]
\RequirePackage{pict2e, xfp, qrcode}
% element
@@ -32,18 +32,21 @@
\def\GetPattern{%
\ifcsname qcc\@up\@left\@right\@down\endcsname
\csname qcc\@up\@left\@right\@down\endcsname
-\else\rule\qr@modulesize\z@\fi}
+\fi}
% backwards compatibility
\def\fancyqr@clap#1{\hb@xt@\z@{\hss#1\hss}}
-\newdimen\fancyqr@edge@compensate
-\fancyqr@edge@compensate=.15\p@
+\newdimen\fancyqr@edge@compensate \fancyqr@edge@compensate=.15\p@
% is larger to be compensated by overlaps
\def\qrm{\dimexpr\qr@modulesize+\fancyqr@edge@compensate\relax}
\long\def\qr@newpattern#1#2#3#4#5{%
-\expandafter\def\csname qcc#1#2#3#4\endcsname{\parbox[b][\qr@modulesize]\qr@modulesize{\kern-\fancyqr@edge@compensate\relax\smash{\fancyqr@clap{\picture(\@ne,\@ne)#5\endpicture}}}%
-}}
+\expandafter\def\csname qcc#1#2#3#4\endcsname{% scaling happens implicitly by the unitlength
+ \put(\the\j,\the\numexpr\@max@y-\the\i){%
+ \advance\unitlength by\fancyqr@edge@compensate\relax
+ #5%
+ }}%
+}
% [#3][#2]
% [#4][#1]
@@ -97,11 +100,13 @@
\def\@fancy@qr@default@name{default}
\def\FancyQrLoad#1{%
+\protected@edef\fancyqr@loaded@style{#1}%
\def\fancyqr@rounded@rect@close{\fillpath}%
-\let\@tmp\newpattern\let\newpattern\qr@newpattern\@bsphack\def\@@tmp{#1}\ifx\@@tmp\@fancy@qr@default@name\FancyQrLoadDefault\else
+\let\@tmp\newpattern\let\newpattern\qr@newpattern\@bsphack\def\@@tmp{#1}%
+\ifx\@@tmp\@fancy@qr@default@name\FancyQrLoadDefault\else
\expandafter\edef\csname pingu@lib@#1@atcode\endcsname{\the\catcode`\@}%
\catcode`\@=11\relax
-\input{fancyqr-style-#1.code}
+\input{fancyqr-style-#1.code}%
\catcode`\@=\csname pingu@lib@#1@atcode\endcsname
\fi\@esphack\let\newpattern\@tmp\let\@tmp\relax}
@@ -145,57 +150,63 @@
\def\fancy@qr@printmatrix#1{%
\def\qr@white{0}\def\qr@black{1}%
\protected@edef\fancyqr@currprint{#1}%
- \let\qr@black@fixed\qr@black
- \let\qr@white@fixed\qr@white
- \let\qr@black@format\qr@black
- \let\qr@white@format\qr@white
+ \let\qr@black@fixed\qr@black \let\qr@white@fixed\qr@white
+ \let\qr@black@format\qr@black \let\qr@white@format\qr@white
%Set module size
- \qr@modulesize=\qr@desiredheight
+ \qr@modulesize=\qr@desiredheight\relax
\divide\qr@modulesize by \qr@size\relax
- \unitlength=\dimexpr\qr@modulesize+\fancyqr@edge@compensate\relax % initialize unitlength once
+ \unitlength=\dimexpr\qr@modulesize\relax % will be re-set in placement
\if@fancyqr@image@% image is in \fancyqr@imgbox
\edef\@x{\fpeval{ceil((.5\wd\fancyqr@imgbox)/\qr@modulesize)+\fancyqr@img@padding@x}}%
\edef\@y{\fpeval{ceil((.5\ht\fancyqr@imgbox+.5\dp\fancyqr@imgbox)/\qr@modulesize)+\fancyqr@img@padding@y}}%
\FancyQrDoNotPrintSquare\@x\@y
\fi
\qr@minipagewidth=\qr@desiredheight
- \ifqr@tight \advance\qr@minipagewidth by -\qr@modulesize \else \advance\qr@minipagewidth by 7\qr@modulesize \fi
- \minipage\qr@minipagewidth%
- \hfuzz=\qr@modulesize
- \baselineskip=\qr@modulesize
- \lineskiplimit=\z@ \lineskip=\z@ \parskip=\z@
- \ifqr@tight\else\rule\z@{4\qr@modulesize}\par\fi% %Blank space at top.
+ \ifqr@tight\else \advance\qr@minipagewidth by 8\qr@modulesize\relax \fi
+ \begingroup
\edef\@max@x{\qr@numberofrowsinmatrix\fancyqr@currprint}\edef\@half@max@x{\the\numexpr\@max@x/2}%
\edef\@max@y{\qr@numberofcolsinmatrix\fancyqr@currprint}\edef\@half@max@y{\the\numexpr\@max@y/2}%
+ % redefine the border to be white!
+ \qr@for \i=\@ne to \@max@y by \@ne{%
+ % redefine the limits to be white!
+ \qr@storetomatrix\fancyqr@currprint{\the\numexpr\z@}{\the\i}{\qr@white}%
+ \qr@storetomatrix\fancyqr@currprint{\the\numexpr\@max@x+\@ne}{\the\i}{\qr@white}%
+ }%
+ \qr@for \i=\@ne to \@max@x by \@ne{%
+ \qr@storetomatrix\fancyqr@currprint{\the\i}{\the\numexpr\z@}{\qr@white}%
+ \qr@storetomatrix\fancyqr@currprint{\the\i}{\the\numexpr\@max@y+\@ne}{\qr@white}%
+ }%
\edef\@do@x@min{\the\numexpr\@half@max@x-\fancy@qr@donotprint@center@x-\@ne}%
\edef\@do@x@max{\the\numexpr\@half@max@x+\fancy@qr@donotprint@center@x+\@ne}%
\edef\@do@y@min{\the\numexpr\@half@max@y-\fancy@qr@donotprint@center@y-\@ne}%
\edef\@do@y@max{\the\numexpr\@half@max@y+\fancy@qr@donotprint@center@y+\@ne}%
- \qr@for \i=\@ne to \@max@y by \@ne{%
- \ifqr@tight\else\rule{4\qr@modulesize}\z@\fi% %Blank space at left.
- \qr@for \j=\@ne to \@max@x by \@ne{%
+ \edef\@tmp@tight{\ifqr@tight\z@\else-4\fi}%
+ \picture(\qr@minipagewidth,\qr@minipagewidth)(\the\numexpr\@ne+\@tmp@tight,\@tmp@tight)
+ \qr@for \i=\@ne to \@max@y by \@ne{\qr@for \j=\@ne to \@max@x by \@ne{%
\qr@fancy@updateif\i\j
\iffancy@qr@do@print@
- \edef\@mid{\qr@matrixentry\fancyqr@currprint{\the\i}{\the\j}}%
- \ifnum\@mid=\qr@white
- \rule\qr@modulesize\z@
- \else% if not white, get its pattern
- \iffancy@qr@roundcut@\qr@fancy@clear@surround\fancyqr@currprint{\the\i}{\the\j}\fi
- \edef\@up{\qr@matrixentry\fancyqr@currprint{\the\numexpr\the\i-1}{\the\j}}%
- \edef\@left{\qr@matrixentry\fancyqr@currprint{\the\i}{\the\numexpr\the\j-1}}%
- \edef\@right{\qr@matrixentry\fancyqr@currprint{\the\i}{\the\numexpr\the\j+1}}%
- \edef\@down{\qr@matrixentry\fancyqr@currprint{\the\numexpr\the\i+1}{\the\j}}%
- \FancyQrColor{\GetPattern}%
- \fi\else \rule\qr@modulesize\z@\fi
- }\par}%
- \ifqr@tight\else\rule\z@{4\qr@modulesize}\par\fi
- \endminipage
- \if@fancyqr@image@\nobreak
- \llap{\parbox\qr@minipagewidth{\centering\usebox\fancyqr@imgbox}%
- % if half the width is odd, offset by half a module width, done by centering
- \edef\@halfcheck{\fpeval{round(\fancy@qr@donotprint@center@x/2)}}%
- \ifodd\@halfcheck \kern.5\qr@modulesize\fi
- }\fi
+ \edef\@mid{\qr@matrixentry\fancyqr@currprint{\the\i}{\the\j}}%
+ \ifnum\@mid=\qr@black\relax
+ \iffancy@qr@roundcut@\qr@fancy@clear@surround\fancyqr@currprint{\the\i}{\the\j}\fi
+ \edef\@up{\qr@matrixentry\fancyqr@currprint{\the\numexpr\the\i-\@ne}{\the\j}}%
+ \edef\@left{\qr@matrixentry\fancyqr@currprint{\the\i}{\the\numexpr\the\j-\@ne}}%
+ \edef\@right{\qr@matrixentry\fancyqr@currprint{\the\i}{\the\numexpr\the\j+\@ne}}%
+ \edef\@down{\qr@matrixentry\fancyqr@currprint{\the\numexpr\the\i+\@ne}{\the\j}}%
+ \FancyQrColor{\GetPattern}%
+ \fi\fi
+ }}%
+ \if@fancyqr@image@
+ % floating point mid
+ \put(\fpeval{.5*\@max@x+.5},\fpeval{.5*\@max@y}){%
+ \edef\@halfcheck{\fpeval{round(\fancy@qr@donotprint@center@x/2)}}%
+ \raisebox{-.5\height}{\clap{% TODO: remove this offset
+ \ifodd\@halfcheck \else\kern\qr@modulesize\fi
+ \usebox\fancyqr@imgbox
+ }}%
+ }%
+ \fi
+ \endpicture
+ \endgroup
}%
\def\fancy@qr@setup#1{%
@@ -263,6 +274,15 @@
\define@key{fancyqr}{random color}{\@fancyqr@randomcolor@true\def\@fancyqr@random@colors{#1}}
\define@key{fancyqr}{width}{\setkeys{qr}{height=#1}}
\define@key{fancyqr}{size}{\setkeys{qr}{height=#1}}
+% \fancyqr@loaded@style
+\def\fancyqr@flat@style{flat}
+\define@boolkey{fancyqr}[@fancyqr@]{classic}[true]{} % if@fancyqr@classic
+\def\fancyqr@classic{%
+\ifx\fancyqr@loaded@style\fancyqr@flat@style\else\FancyQrLoad{\fancyqr@flat@style}\fi
+\setkeys{fancyqr}{%
+ gradient=false,color=black,l color=black,r color=black%
+}%
+}
\def\fancyqrset#1{\setkeys{qr,fancyqr}{#1}}
\fancyqrset{image padding=0,gradient=true,gradient angle=135,r color=teal,l color=purple}
@@ -275,12 +295,10 @@
\newcommand\@@fancyqr[1][]{\begingroup\@fancyqr@init
\ifqr@starinvoked\qr@hyperlinkfalse\fi
\setkeys{qr,fancyqr}{#1}%
+\if@fancyqr@classic\fancyqr@classic\fi%
\if@fancyqr@randomcolor@%
\ifcsname pgfmathdeclarerandomlist\endcsname\else
\PackageError{fancyqr}{Random colors requested but pgfmath not loaded}{Please load pgfmath if you want this}\fi
\pgfmathdeclarerandomlist{@@fancyqr@@randomcol}{\@fancyqr@random@colors}\let\FancyQrColor\@@fancyqr@color@random\else\if@fancyqr@gradient\let\FancyQrColor\@@fancyqr@color@gradient\fi\fi
\bgroup\qr@verbatimcatcodes\qr@setescapedspecials\qrcode@in}
\endinput
-
-% TODO: NEGATIVE PATTERNS IF MIDDLE IS 0
-% => make rounded negative corners
diff --git a/graphics/pgf/contrib/fancyqr/qr-example.tex b/graphics/pgf/contrib/fancyqr/qr-example.tex
index e0518297eb..fe32ae73c9 100644
--- a/graphics/pgf/contrib/fancyqr/qr-example.tex
+++ b/graphics/pgf/contrib/fancyqr/qr-example.tex
@@ -3,6 +3,7 @@
% https://opensource.org/licenses/gpl-3.0.html
\documentclass{article}
+\usepackage[T1]{fontenc}
\usepackage{fontawesome}
\usepackage{fancyqr}
@@ -13,13 +14,18 @@
% to showcase scalebox
\usepackage{graphicx}
+% for the coding font
+\usepackage{FiraMono}
+
\usepackage[active,tightpage]{preview} % for presentation
\setlength\PreviewBorder{15pt}
-\fancyqrset{size=3.25cm,level=H,padding}
+\fancyqrset{size=3.25cm, level=H, padding}
+\errorcontextlines=9999
\begin{document}
\preview
+\begin{center}
% \FancyQrDoNotPrintSquare{8}{9}
% \FancyQrHardCut
\mbox{\FancyQrLoad{blobs}%
@@ -28,6 +34,8 @@
\fancyqr{https://github.com/EagleoutIce/fancyqr}%
\FancyQrLoad{dots}%
\fancyqr[image={\textsf{\textbf{\textcolor{gray}{fancy}qr}}}, random color={@Red}{@Pink}{@Purple}{@DeepPurple}{@Indigo}{@Blue}{@Cyan}{@Teal}{@Green}{@Amber}{@Orange}{@DeepOrange}{@Brown}]{https://github.com/EagleoutIce/fancyqr}%
-}%
+}\\[4mm]
+\texttt{\textbackslash \textbf{fancyqr}\{\textcolor{@Grey}{https://github.com/EagleoutIce/fancyqr}\}}
+\end{center}
\endpreview
\end{document} \ No newline at end of file
diff --git a/graphics/pgf/contrib/fancyqr/qr-minimal.tex b/graphics/pgf/contrib/fancyqr/qr-minimal.tex
new file mode 100644
index 0000000000..b912709808
--- /dev/null
+++ b/graphics/pgf/contrib/fancyqr/qr-minimal.tex
@@ -0,0 +1,12 @@
+\documentclass{article}
+
+\usepackage{fancyqr}
+
+\usepackage[active,tightpage]{preview}
+\setlength\PreviewBorder{0pt}
+
+\begin{document}
+\preview
+\fancyqr[classic,padding]{https://github.com/EagleoutIce/fancyqr}
+\endpreview
+\end{document}