diff options
author | Karl Berry <karl@freefriends.org> | 2022-08-18 22:55:27 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-08-18 22:55:27 +0000 |
commit | 2f34cb860eb0c6ee8ec82de5525a7689f257e6c9 (patch) | |
tree | 78c2a0c200964c1aaea1f64f40c93462d8411ee9 /Master/texmf-dist/doc/latex | |
parent | f9b9d32b40a2d188b881b1625c844c82be384cc5 (diff) |
fancyqr (19aug22)
git-svn-id: svn://tug.org/texlive/trunk@64141 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex')
-rw-r--r-- | Master/texmf-dist/doc/latex/fancyqr/README.md | 36 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/fancyqr/fancyqr-doc.pdf | bin | 0 -> 248260 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/fancyqr/fancyqr-doc.tex | 87 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/fancyqr/qr-example.tex | 25 |
4 files changed, 148 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/fancyqr/README.md b/Master/texmf-dist/doc/latex/fancyqr/README.md new file mode 100644 index 00000000000..ebb21733483 --- /dev/null +++ b/Master/texmf-dist/doc/latex/fancyqr/README.md @@ -0,0 +1,36 @@ +# fancyqr + +[![made-with-latex](https://img.shields.io/badge/Made%20with-LaTeX-1f425f.svg)](https://www.latex-project.org/) [![GPLv3 License](https://img.shields.io/badge/License-GPL%20v3-yellow.svg)](https://opensource.org/licenses/GPL-3.0) [![PR's Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](http://makeapullrequest.com) [![compile qr](https://github.com/EagleoutIce/fancyqr/actions/workflows/compile.yaml/badge.svg)](https://github.com/EagleoutIce/fancyqr/actions/workflows/compile.yaml) + +[<img src="https://github.com/EagleoutIce/fancyqr/blob/gh-pages/preview-1.png?raw=true" width="600"/>](qr-example.tex) + +Simple package to create fancy qr-codes with the help of the [`qrcode`](https://www.ctan.org/pkg/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/blob/gh-pages/build/fancyqr-doc.pdf). + +*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)). + +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`. +At the moment, there are six other styles `flat`, `frame`, `blob`, `glitch`, `swift`, 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 `\FancyLoadDefault`. + +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. | + +The defaults are set like this: + +```LateX +\fancyqrset{image padding=0,gradient=true,gradient angle=135,r color=teal,l color=purple} +``` + +[^1]: The package will automatically calculate the required `\FancyQrDoNotPrintSquare` (you have to make sure the, the qr code still has enough information to be readable). Therefore, the image will not scale with the qr code. diff --git a/Master/texmf-dist/doc/latex/fancyqr/fancyqr-doc.pdf b/Master/texmf-dist/doc/latex/fancyqr/fancyqr-doc.pdf Binary files differnew file mode 100644 index 00000000000..c2a0ae96618 --- /dev/null +++ b/Master/texmf-dist/doc/latex/fancyqr/fancyqr-doc.pdf diff --git a/Master/texmf-dist/doc/latex/fancyqr/fancyqr-doc.tex b/Master/texmf-dist/doc/latex/fancyqr/fancyqr-doc.tex new file mode 100644 index 00000000000..40712060b92 --- /dev/null +++ b/Master/texmf-dist/doc/latex/fancyqr/fancyqr-doc.tex @@ -0,0 +1,87 @@ +% Florian Sihler, 2022 +% Licensed under GNU General Public License version 3 +% https://opensource.org/licenses/gpl-3.0.html +\documentclass[parskip=half,english,numbers=noenddot,footnotes=nomultiple,oneside]{scrartcl} + +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage{babel} + +\usepackage{microtype} +\usepackage[hidelinks]{hyperref} + +\usepackage{lmodern} +\usepackage{array,booktabs} +\usepackage{footnote} +\usepackage{fontawesome} + +\usepackage{fancyqr} +\usepackage{xcolor} +\usepackage[tex]{listings} + +\lstdefinelanguage{ltx}{ + language={[LaTeX]TeX}, + moretexcs=[1]{fancyqr,qrcode,FancyQrDoNotPrintSquare,FancyQrRoundCut,FancyQrHardCut,FancyQrLoad,FancyLoadDefault,fancyqrset,faGithub} +} +\lstset{basicstyle=\ttfamily,breaklines,texcsstyle=*\color{purple}\bfseries,language=ltx} +\lstMakeShortInline| +\def\ltx#1{\lstinline/#1/} +\interfootnotelinepenalty=10000 + + +\title{The \texttt{fancyqr} package} +\author{% + \texorpdfstring{Florian Sihler\medskip\\* + \fancyqr{https://github.com/EagleoutIce/fancyqr} + }{Florian Sihler}} +\date{Version v1.0 \textendash\ 2022/08/18} + + +\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. + 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|. + At the moment, there are six other styles for the qr-code |flat|, |frame|, |blob|, |glitch|, |swift|, 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 |\FancyLoadDefault|. + + All of the extra qr-options (you can set all of them with |\fancyqrset{<keys>}|) are showcased in \autoref{tbl:extra-keys}. + The defaults are set like this: +\begin{lstlisting} +\fancyqrset{image padding=0,gradient=true, + gradient angle=135,r color=teal,l color=purple} +\end{lstlisting} + Consider the following example (uses \href{https://www.ctan.org/pkg/fontawesome}{fontawesome} for the symbol, but you can use include images,~\ldots): +\begin{lstlisting} +\fancyqr[image=\huge\faGithub,image padding=1,color=black!90!gray]{https://github.com/EagleoutIce/fancyqr} +\end{lstlisting} + + \parbox[c]{.3\linewidth}{Which produces:}\hfill\parbox[c]{.4\linewidth}{\raggedleft\fancyqr[image=\Huge\faGithub,image padding=1,color=black!90!gray]{https://github.com/EagleoutIce/fancyqr}}\par + + \begin{savenotes} + \begin{table} + \centering\begin{tabular}{>{\ttfamily}ll>{\ttfamily}cp{.5\linewidth}} + \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.} \\ + 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|. \\ + 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. \\ + \bottomrule + \end{tabular} + \caption{Overview of special qr-options.} + \label{tbl:extra-keys} + \end{table} + \end{savenotes} + +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/fancyqr/qr-example.tex b/Master/texmf-dist/doc/latex/fancyqr/qr-example.tex new file mode 100644 index 00000000000..d58e7f835d8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/fancyqr/qr-example.tex @@ -0,0 +1,25 @@ +% Florian Sihler, 2022 +% Licensed under GNU General Public License version 3 +% https://opensource.org/licenses/gpl-3.0.html +\documentclass{article} + +\usepackage{fontawesome} + +\usepackage{fancyqr} + +\usepackage[active,tightpage]{preview} % for presentation +\setlength\PreviewBorder{15pt} + +\fancyqrset{height=3.25cm,level=H,padding} + +\begin{document} +\preview +% \FancyQrDoNotPrintSquare{8}{9} +% \FancyQrHardCut +\mbox{\FancyQrLoad{blobs} +\fancyqr[image=\scalebox{2.9}{\faGithub\kern1pt},image padding=1,color=black!90!gray]{https://github.com/EagleoutIce/fancyqr} +\FancyQrLoad{default} +\fancyqr{https://github.com/EagleoutIce/fancyqr} +\FancyQrLoad{dots}\fancyqr[image={\tikz\node[align=center,draw]{\huge Ha\\Huhu};},r color=gray,gradient angle=45]{https://github.com/EagleoutIce/fancyqr}}% +\endpreview +\end{document}
\ No newline at end of file |