summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-07-24 20:22:31 +0000
committerKarl Berry <karl@freefriends.org>2023-07-24 20:22:31 +0000
commitff358decc98f9c2b462ff4685493a85850279b4f (patch)
tree5e533937d722016b6539b585d50b2cae88aead86
parente4644c3bdc055b708f195bf28310a681c78814fd (diff)
qrbill (24jul23)
git-svn-id: svn://tug.org/texlive/trunk@67724 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/qrbill/DEPENDS.txt9
-rw-r--r--Master/texmf-dist/doc/latex/qrbill/README.md16
-rw-r--r--Master/texmf-dist/doc/latex/qrbill/qrbill-epc-demo.tex54
-rw-r--r--Master/texmf-dist/doc/latex/qrbill/qrbill-letter-demo.tex5
-rw-r--r--Master/texmf-dist/doc/latex/qrbill/qrbill-standalone-demo.tex5
-rw-r--r--Master/texmf-dist/doc/latex/qrbill/qrbill.pdfbin86454 -> 92566 bytes
-rw-r--r--Master/texmf-dist/scripts/qrbill/qrbill-latexluaqrcode.lua2
-rw-r--r--Master/texmf-dist/source/latex/qrbill/qrbill.dtx204
-rw-r--r--Master/texmf-dist/source/latex/qrbill/qrbill.ins6
-rw-r--r--Master/texmf-dist/tex/latex/qrbill/epc.qrbill-cfg.tex5
-rw-r--r--Master/texmf-dist/tex/latex/qrbill/qrbill.sty46
-rw-r--r--Master/texmf-dist/tex/latex/qrbill/swiss.qrbill-cfg.tex5
12 files changed, 264 insertions, 93 deletions
diff --git a/Master/texmf-dist/doc/latex/qrbill/DEPENDS.txt b/Master/texmf-dist/doc/latex/qrbill/DEPENDS.txt
new file mode 100644
index 00000000000..01d6da3071e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/qrbill/DEPENDS.txt
@@ -0,0 +1,9 @@
+expl3
+koma-script
+qrcode
+l3packages
+scrbase
+graphicx
+numprint
+
+soft fontspec # custom fonts possible with all compilers \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/qrbill/README.md b/Master/texmf-dist/doc/latex/qrbill/README.md
index 3888da81b22..37c9bd8a19b 100644
--- a/Master/texmf-dist/doc/latex/qrbill/README.md
+++ b/Master/texmf-dist/doc/latex/qrbill/README.md
@@ -4,13 +4,17 @@ Copyright (C) Marei Peischl (peiTeX) <marei@peitex.de>, 2020–2023
This work is part of a collaborative project of Marei Peischl (peiTeX) and Alex Antener (foobar LLC).
-qrbill 2023/02/28 v2.00
+qrbill 2023/07/24 v2.01
***************************************************************************
This material is subject to the LaTeX Project Public License version 1.3c
or later. See http://www.latex-project.org/lppl.txt for details.
+ The included qrbill-qrencode.lua file is subject to a 3-clause BSD license
+ Copyright (c) 2012-2020, Patrick Gundlach (SPEEDATA GMBH) and contributors,
+ see https://github.com/speedata/luaqrcode. All rights reserved.
+
***************************************************************************
## Provided files
@@ -28,6 +32,7 @@ The files
as well as the demo files
* qrbill-standalone-demo.tex
* qrbill-letter-demo.tex
+* qrbill-epc-demo.tex
can be created from the qrbill.dtx by processing the qrbill.ins-file.
## Installation Notes
@@ -81,4 +86,11 @@ For further information on l3build and other options please have a look at the c
* v1.07 (2022-10-20)
- fix utf8 encoding für qrmode=package
* v2.00 (2023-02-28)
- - add luaqrcode to qrbill \ No newline at end of file
+ - add luaqrcode to qrbill
+ * v2.01 (2023-07-24)
+ - add full epc qrcode example
+ - improve documentation
+ - disable hyperlink if `qrmode=package` and hyperref is loaded
+ - support icons with epc qrcodes
+ - fix icon alignment for `qrmode=lua`
+ - update luaqrcode library
diff --git a/Master/texmf-dist/doc/latex/qrbill/qrbill-epc-demo.tex b/Master/texmf-dist/doc/latex/qrbill/qrbill-epc-demo.tex
new file mode 100644
index 00000000000..d06fce4fee7
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/qrbill/qrbill-epc-demo.tex
@@ -0,0 +1,54 @@
+%%
+%% This is file `qrbill-epc-demo.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% qrbill.dtx (with options: `qrbill-epc-demo.tex')
+%%
+%% Copyright (C) 2020–2023 by Marei Peischl (peiTeX) <marei@peitex.de>
+%%
+%% This work is a collaboration of
+%% Marei Peischl (peiTeX) and Alex Antener (foobar LLC).
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is
+%% Marei Peischl <qrbill@peitex.de>.
+%%
+%% This work consists of the files
+%% qrbill.dtx and qrbill.ins, qrbill-vocab.csv
+%% and the derived files
+%% qrbill.sty, swiss.qrbill-cfg.tex, epc.qrbill-cfg.tex,
+%% qrbill-letter-demo.tex, qrbill-standalone-demo.tex,
+%% and qrbill-epc-demo.tex.
+%%
+%% The development repository can be found at
+%% https://github.com/peitex/qrbill
+%% Please use the issue tracker for feedback!
+%%
+\documentclass{article}
+\usepackage[qrscheme=epc]{qrbill}
+
+\begin{document}
+
+\QRbill*[
+ BIC=BYLADEM1GLS,
+ Account=DE68430609671013251700,
+ Name=peiTeX,
+ Amount=EUR1 .42,
+ Message={Invoice 2022:1337, customer 1337}
+]
+
+\end{document}
+\endinput
+%%
+%% End of file `qrbill-epc-demo.tex'.
diff --git a/Master/texmf-dist/doc/latex/qrbill/qrbill-letter-demo.tex b/Master/texmf-dist/doc/latex/qrbill/qrbill-letter-demo.tex
index 5e56ff6c79b..df2961dfbbd 100644
--- a/Master/texmf-dist/doc/latex/qrbill/qrbill-letter-demo.tex
+++ b/Master/texmf-dist/doc/latex/qrbill/qrbill-letter-demo.tex
@@ -28,14 +28,13 @@
%% qrbill.dtx and qrbill.ins, qrbill-vocab.csv
%% and the derived files
%% qrbill.sty, swiss.qrbill-cfg.tex, epc.qrbill-cfg.tex,
-%% qrbill-letter-demo.tex, qrbill-standalone-demo.tex.
+%% qrbill-letter-demo.tex, qrbill-standalone-demo.tex,
+%% and qrbill-epc-demo.tex.
%%
%% The development repository can be found at
%% https://github.com/peitex/qrbill
%% Please use the issue tracker for feedback!
%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[foldmarks=b]{scrletter}
\usepackage[
frame=top,
diff --git a/Master/texmf-dist/doc/latex/qrbill/qrbill-standalone-demo.tex b/Master/texmf-dist/doc/latex/qrbill/qrbill-standalone-demo.tex
index 9c18912455c..b01628ee9a9 100644
--- a/Master/texmf-dist/doc/latex/qrbill/qrbill-standalone-demo.tex
+++ b/Master/texmf-dist/doc/latex/qrbill/qrbill-standalone-demo.tex
@@ -28,14 +28,13 @@
%% qrbill.dtx and qrbill.ins, qrbill-vocab.csv
%% and the derived files
%% qrbill.sty, swiss.qrbill-cfg.tex, epc.qrbill-cfg.tex,
-%% qrbill-letter-demo.tex, qrbill-standalone-demo.tex.
+%% qrbill-letter-demo.tex, qrbill-standalone-demo.tex,
+%% and qrbill-epc-demo.tex.
%%
%% The development repository can be found at
%% https://github.com/peitex/qrbill
%% Please use the issue tracker for feedback!
%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{standalone}
\usepackage[nswissgerman]{babel}
diff --git a/Master/texmf-dist/doc/latex/qrbill/qrbill.pdf b/Master/texmf-dist/doc/latex/qrbill/qrbill.pdf
index 1125e6cddc7..e73d98218b2 100644
--- a/Master/texmf-dist/doc/latex/qrbill/qrbill.pdf
+++ b/Master/texmf-dist/doc/latex/qrbill/qrbill.pdf
Binary files differ
diff --git a/Master/texmf-dist/scripts/qrbill/qrbill-latexluaqrcode.lua b/Master/texmf-dist/scripts/qrbill/qrbill-latexluaqrcode.lua
index b1c31c2c644..80d88282795 100644
--- a/Master/texmf-dist/scripts/qrbill/qrbill-latexluaqrcode.lua
+++ b/Master/texmf-dist/scripts/qrbill/qrbill-latexluaqrcode.lua
@@ -1,4 +1,4 @@
-qrencode = require("qrencode.lua")
+qrencode = require("qrbill-qrencode.lua")
function printQRcode(codestring)
local ok, tab = qrencode.qrcode(codestring, 2)
diff --git a/Master/texmf-dist/source/latex/qrbill/qrbill.dtx b/Master/texmf-dist/source/latex/qrbill/qrbill.dtx
index c7739d81d32..4455b155758 100644
--- a/Master/texmf-dist/source/latex/qrbill/qrbill.dtx
+++ b/Master/texmf-dist/source/latex/qrbill/qrbill.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Copyright (C) 2020–2023 by Marei Peischl (peiTeX) <marei@peitex.de>
%
@@ -30,7 +30,7 @@
% https://github.com/peitex/qrbill
% Please use the issue tracker for feedback!
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \fi
% \iffalse
@@ -54,7 +54,7 @@
% \fi
% \iffalse
%<*driver>
-\ProvidesFile{qrbill.dtx}[2023/02/28 v2.00 \ create QR-bills based on the Swiss standard]
+\ProvidesFile{qrbill.dtx}[2023/07/24 v2.01 \ create QR-bills based on the Swiss standard]
\documentclass[english, parskip=half-]{scrartcl}
\usepackage{iftex}
\ifPDFTeX
@@ -76,6 +76,12 @@
\inputminted[autogobble, escapeinside=||,tabsize=4]{latex}{minted.doc.out}
}
+\newenvironment{doccode*}{
+ \VerbatimEnvironment
+ \begin{VerbatimOut}[tabsize=4]{minted.doc.out}}
+ {\end{VerbatimOut}
+ \inputminted[autogobble, escapeinside=||,tabsize=4]{latex}{minted.doc.out}
+}
\usepackage{babel}
\usepackage[babel]{csquotes}
@@ -161,6 +167,9 @@
\usepackage{qrbill}
+\usepackage{geometry}
+\geometry{left=4cm}
+
\usepackage[hidelinks]{hyperref}
\begin{document}
@@ -186,9 +195,7 @@
%
% By means of the \LaTeX{} framework, the qrbill can simply be integrated into existing accounting environments and automated billing systems.
% \iffalse
-% \begin{macrocode}
-%<*qrbill.sty>
-% \end{macrocode}
+%<*package>
% \fi
% \section{Example of use}
% The easies way to use the qrbill package is to create a bill with the standalone documentclass:
@@ -214,8 +221,9 @@
% \end{document}
% \end{doccode}
%
-% \DescribeMacro{\QRbill}\oarg{Data Setup}
+% \DescribeMacro{\QRbill}\sarg\oarg{Data Setup}
% The macro \latexinline{\QRbill} creates a box of 210\,mm${}\times{}$105\,mm size. It will include a qrbill as described in the design guide \cite{qrbill-design} and insert all available data.
+% The starred version (\latexinline{\QRbill*}) is only creating the QRcode without additional visible data. This is not necessarry for the swiss standard, but allows the usage with other QRcode schemes like the EPC QR codes (see section \ref{sec:epc}).
%
% There is also an example in the appendix showing all data fields (see appendix \ref{standalone-complete} on page \pageref{standalone-complete}).
%
@@ -287,10 +295,16 @@
% \changes{v2.00}{2023/02/28}{qrencode.lua now is part of the qrbill package}
% With Version 2.0 the package supports usage of the the luaqrcode library \cite{luaqrcode}. This can be enabled by using the \latexinline{qmode=lua} option.
%
-% \item[qrscheme (Name of a custom QRbill scheme) (swiss)]
-% Loads the definitions for the QRcode and the BillingInformation. Currently only the
-% swiss qrbill scheme is available, but one can define own variants based on this file.
-% Users can copy the file swiss.qrbill-cfg.tex as an example.
+% \changes{v2.01}{2023/07/24}{add qrsize option}
+% \item[qrsize (length) (46mm)]
+% Allows to change the size of the created QRcoode.
+% The default setting is chosen to match the swiss QRbills.
+%
+% \item[qrscheme (Name of a QRbill scheme e.g. swiss or epc) (swiss)]
+% Loads the definitions for the QRcode and the BillingInformation.
+% Currently only the swiss qrbill scheme (\latexinline{qrscheme=swiss}) and EPC QRcodes (\latexinline{qrscheme=epc}) are available, but one can define own variants based on this file.
+% Users can copy the file swiss.qrbill-cfg.tex as a template.
+% The package will look for a file named “\textlangle value of the qrscheme option\textrangle.qrbill-cfg.tex” to load the scheme.
%
% \changes{v1.02}{2020/08/25}{add referenceseparator option}
% \item[referenceseparator (tokenlist) (\textbackslash,)]
@@ -404,14 +418,14 @@
% \end{center}
% To set an address of type \enquote{K} one can use they option key \latexinline{debtor} or \latexinline{creditor}. Type \enquote{S} can be achieved using the starred variant (\latexinline{debtor*}/\latexinline{creditor*}).
%
-% \begin{minipage}{.5\linewidth}
+% \begin{minipage}{.4\linewidth}
% \begin{doccode}
% creditor={Name\\
% Street Nr.\\
% PostalCode City\\
% CountryCode},
% \end{doccode}
-% \end{minipage}%
+% \end{minipage}\hfill
% \begin{minipage}{.5\linewidth}
% \begin{doccode}
% creditor*={Name\\
@@ -479,42 +493,53 @@
% \par\medskip
% Data fields to automatically create the BillingInfo string. The key in parentheses indicates the prefix to be used to construct the string.\par
% \ExplSyntaxOn
-% \prop_map_inline:Nn \g__qrbill_billing_info_prop {#2~(#1)\\}
+% \prop_map_inline:Nn \g__qrbill_billing_info_prop {#2~(#1)\\}\strut
% \ExplSyntaxOff
-%
% \section{Setup for EPC QR codes}
+% \label{sec:epc}
% EPC QR codes can be used for SEPA credit transfer (SCT).
% They do not include any data about the debtor or tax information.
% Therefore they may only be used with the starred variant of \latexinline{\QRbill*} or the user has to provide additional data interfaces.
+%
+% To use this kind of QRcodes with qrbill one has to select the corresponding \latexinline{qrscheme}:
+% \begin{doccode}
+% \usepackage[qrscheme=epc]{qrbill}
+% \end{doccode}
% \subsection{Preconfigured data}
% \changes{v1.04}{2022/07/01}{Add basic support for EPC QR codes}
% The epc qrscheme provided by this package preset the following data:
% \begin{doccode}
% \SetupQrBill{
-% QRType=BCD,
-% Version=002,
-% CodingType=1,% UTF-8, 2 would be ISO
-% Trailer=SCT,
-% }
+% QRType=BCD,
+% Version=002,
+% CodingType=1,% UTF-8, 2 would be ISO
+% Trailer=SCT,
+% }
% \end{doccode}
% These fields are required to use these values for the current version of the EPC QR code.
%
% \subsection{Required data}
-% The data fields required by the EPC QRcode can be set directly. A full example for an easy EPC qrcode would be
-% \begin{doccode}
-% \QRbill*[
-% BIC=BYLADEM1GLS,
-% Account=DE68430609671013251700,
-% Name=peiTeX,
-% Amount=EUR123.42,
-% Message={Invoice 2022:1337, customer 1337}
-% ]
-% \end{doccode}
+% The data fields required by the EPC QRcode can be set directly. A full example for an easy EPC qrcode can be found in appendix \ref{sec:example-epc}.
+%
+% \subsection{Overview over all data fields}
+% \label{sec:epc-data-complete}
+% \changes{v2.01}{2023/07/24}{Add overview over all epc qrcode data fields}
+% Data fields which are used in the QRcode:\par
+% \begingroup
+% \ExplSyntaxOn
+% \file_get:nnN {epc.qrbill-cfg.tex} {\char_set_catcode_comment:N \% } \l_tmpa_tl
+% \let\endinput\relax
+% \l_tmpa_tl
+% \seq_use:Nn \g__qrbill_qrscheme_seq {\\}
+% \ExplSyntaxOff
+% \par\medskip
+% The DTA field is completly optional and can be used to encode the reason for the transfer.
+% \endgroup
% \iffalse
% \section{Implementation}
-% \begin{macrocode}
+% \begin{doccode*}
\RequirePackage{expl3}
-\ProvidesExplPackage{qrbill}{2023/02/28}{2.00}{
+\ProvidesExplPackage{qrbill}{2023/07/24}{2.01}{
Template for QR-bills based on the Swiss Payment Standards
}
\RequirePackage{iftex}
@@ -536,14 +561,21 @@
exists~for~backwards~compatibility~and~will~be~removed.
}
+\tl_new:N \g__qrbill_qrscheme_tl
+
\keys_define:nn {qrbill} {
font .choices:nn = {Frutiger, Arial, Helvetica, Liberation Sans} {
\tl_gset_eq:NN \g__qrbill_font_tl \l_keys_choice_tl
},
font .initial:n = Liberation Sans,
font / custom .code:n = {\tl_gclear:N \g__qrbill_font_tl},
- qrscheme .tl_gset:N = \g__qrbill_qrscheme_tl,
+ qrscheme .choice:,
+ qrscheme / epc .code:n = \tl_gset:Nn \g__qrbill_qrscheme_tl {epc}\tl_gclear:N \g__qrbill_font_tl,
+ qrscheme / unknown .code:n = \tl_gset:Nn \g__qrbill_qrscheme_tl {
+ #1},
qrscheme .initial:n = swiss,
+ qrsize .dim_gset:N = \g_qrbill_QRcode_dim,
+ qrsize .initial:n = 46mm,
creditorprefix .tl_gset:N = \g__qrbill_creditorprefix_tl,
creditorprefix .initial:n = CR-,
debtorprefix .tl_gset:N = \g__qrbill_debtorprefix_tl,
@@ -687,8 +719,6 @@
\RequirePackage{anyfontsize}
}
-\dim_new:N \g_qrbill_QRcode_dim
-\dim_gset:Nn \g_qrbill_QRcode_dim {46mm}
\bool_if:NT \g__qrbill_luamode_bool {
\lua_load_module:n {qrbill-latexluaqrcode}
@@ -697,22 +727,36 @@
\cs_set_protected:Npn \qrbill_qrcode_black: {\rule{\l__qrbill_QRblocksize_dim}{\l__qrbill_QRblocksize_dim}}
\cs_set_protected:Npn \qrbill_qrcode_white: {\rule{\l__qrbill_QRblocksize_dim}{0pt}\rule{0pt}{\l__qrbill_QRblocksize_dim}}
\cs_new:Nn \qrbill_parse_QRcode:n {
- \lua_now:e {
- num, string = printQRcode("\lua_escape:n {#1}")
- }
+ \__qrbill_setup_lua_qrcode:x {#1}
\dim_set:Nn \l__qrbill_QRblocksize_dim {\g_qrbill_QRcode_dim/\lua_now:n {tex.print(num)}}
\let\qrblack\qrbill_qrcode_black:
\let\qrwhite\qrbill_qrcode_white:
\def\qrnewline{\\[\dimexpr-\baselineskip+\l__qrbill_QRblocksize_dim]}
- \noindent\parbox{\g_qrbill_QRcode_dim}{
- \lua_now:n {tex.sprint(string)}
+% \end{doccode*}
+% \changes{v2.01}{2023/07/24}{fix icon alignment for qrmode=lua}
+% \begin{doccode*}
+ \raisebox{\dimexpr\depth-\l__qrbill_QRblocksize_dim}[\dimexpr\height+\depth-\l__qrbill_QRblocksize_dim][0pt]{
+ \noindent\parbox{\g_qrbill_QRcode_dim}{
+ \lua_now:n {tex.sprint(string)}
+ \hss
+ }
}
}
+
+ \cs_new:Nn \__qrbill_setup_lua_qrcode:n {
+ \lua_now:e {
+ num, string = printQRcode("\lua_escape:n {#1}")
+ }
+ }
+
+ \cs_generate_variant:Nn \__qrbill_setup_lua_qrcode:n {x}
}
-% \end{macrocode}
+
+
+% \end{doccode*}
% \changes{v1.07}{2022/10/20}{patch the qrcode package to work with utf-8 strings}
-% \begin{macrocode}
+% \begin{doccode*}
\bool_if:NF \g__qrbill_luamode_bool {
\usepackage{qrcode}
@@ -765,7 +809,10 @@
\cs_set_eq:NN \qr@encode@binary \__qrbill_encode_unicode_binary:n
\raisebox{\depth}{
\__qrbill_enable_unicode_qrcode_patch:
- \qrcode[height= \g_qrbill_QRcode_dim]{#1}
+% \end{doccode*}
+% \changes{v2.01}{2023/07/24}{Disable hyperlink for qrcode in case hyperref is loaded}
+% \begin{doccode*}
+ \qrcode[nolink,height= \g_qrbill_QRcode_dim]{#1}
}
}
@@ -1033,7 +1080,19 @@
\IfBooleanTF {#1}
{
\qrcode_setup_QRcode:
- \qrbill_parse_QRcode:V \l_qrbill_data_str
+ \leavevmode\qrbill_parse_QRcode:V \l_qrbill_data_str
+% \end{doccode*}
+% \changes{v2.01}{2023/07/24}{Add icon support for epc qrcodes}
+% \begin{doccode*}
+ \tl_if_empty:NF \g_qrbill_icon_tl {
+ \llap{\hbox_to_wd:nn {\g_qrbill_QRcode_dim} {
+ \hfill
+ \raisebox{\dimexpr-.5\height+.5\g_qrbill_QRcode_dim}[0pt][0pt]{
+ \includegraphics[width=\g_qrbill_iconwidth_dim]{\g_qrbill_icon_tl}
+ }
+ \hfill
+ }}
+ }
}{
\qrbill_bill_create:
}
@@ -1300,9 +1359,8 @@
\input{\g__qrbill_qrscheme_tl.qrbill-cfg}
-% \end{macrocode}
-% \begin{macrocode}
-%</qrbill.sty>
+% \end{doccode*}
+%</package>
% \section{The file swiss.qrbill-cfg.tex as a custom qrbill scheme}
%<*swiss.qrbill-cfg.tex>
\qrbillsetup{
@@ -1387,18 +1445,16 @@
invoicedate=\QRbillParseDate{\the\year}{\the\month}{\the\day},
vatdate=\QRbillParseDate{\the\year}{\the\month}{\the\day}
}
-% \end{macrocode}
+% \end{doccode*}
% \iffalse
-% \begin{macrocode}
%</swiss.qrbill-cfg.tex>
-% \end{macrocode}
-% \section{The file epc.qrbill-cfg.tex as a custom qrbill scheme}
+% \section{The file epc.qrbill-cfg.tex as additional qrbill scheme}
% This scheme supports much less variables in contrast to the swiss scheme.
% Therefore the \latexinline{\QRbill} macro has to be used as the starred variant or additional variables have to be provided by the user.
%<*epc.qrbill-cfg.tex>
-% \end{macrocode}
+% \end{doccode*}
% \fi
-% \begin{macrocode}
+% \begin{doccode*}
\SetQrScheme{
QRType,
Version,
@@ -1421,7 +1477,7 @@
Trailer=SCT,
}
%</epc.qrbill-cfg.tex>
-% \end{macrocode}
+% \end{doccode*}
% \fi
%
% \PrintChanges
@@ -1436,11 +1492,9 @@
% \changes{v1.03}{2021/05/07}{set sep-iban and sep-reference in examples}
% \label{standalone-complete}
% \iffalse
-% \begin{macrocode}
%<*qrbill-standalone-demo.tex>
-% \end{macrocode}
% \fi
-% \begin{macrocode}
+% \begin{doccode*}
% !TeX program=lualatex
\documentclass{standalone}
\usepackage[nswissgerman]{babel}
@@ -1480,15 +1534,14 @@
]
\end{document}
-% \end{macrocode}
+% \end{doccode*}
% \iffalse
-% \begin{macrocode}
%</qrbill-standalone-demo.tex>
%<*qrbill-letter-demo.tex>
-% \end{macrocode}
% \fi
% \section{qrbill scrletter example}
-% \begin{macrocode}
+% \label{sec:example-qrbill-letter}
+% \begin{doccode*}
% !TeX Program=lualatex
\documentclass[foldmarks=b]{scrletter}
\usepackage[
@@ -1552,12 +1605,33 @@ Text
\end{letter}
\end{document}
-% \end{macrocode}
-%
+% \end{doccode*}
% \iffalse
-% \begin{macrocode}
%</qrbill-letter-demo.tex>
-% \end{macrocode}
+%<*qrbill-epc-demo.tex>
+% \fi
+% \section{Example for EPC qrcode}
+% \label{sec:example-epc}
+% \changes{v2.01}{2023/07/24}{edd epc qrcode example document}
+% \begin{doccode*}
+\documentclass{article}
+\usepackage[qrscheme=epc]{qrbill}
+
+\begin{document}
+
+\QRbill*[
+ BIC=BYLADEM1GLS,
+ Account=DE68430609671013251700,
+ Name=peiTeX,
+ Amount=EUR1 .42,
+ Message={Invoice 2022:1337, customer 1337}
+]
+
+\end{document}
+% \end{doccode*}
+% \iffalse
+%\endinput
+%</qrbill-epc-demo.tex>
% \fi
%\Finale
\endinput
diff --git a/Master/texmf-dist/source/latex/qrbill/qrbill.ins b/Master/texmf-dist/source/latex/qrbill/qrbill.ins
index 1fe8b6669ed..23e4ef8ed53 100644
--- a/Master/texmf-dist/source/latex/qrbill/qrbill.ins
+++ b/Master/texmf-dist/source/latex/qrbill/qrbill.ins
@@ -24,7 +24,8 @@ This work consists of the files
qrbill.dtx and qrbill.ins, qrbill-vocab.csv
and the derived files
qrbill.sty, swiss.qrbill-cfg.tex, epc.qrbill-cfg.tex,
-qrbill-letter-demo.tex, qrbill-standalone-demo.tex.
+qrbill-letter-demo.tex, qrbill-standalone-demo.tex,
+and qrbill-epc-demo.tex.
The development repository can be found at
https://github.com/peitex/qrbill
@@ -52,6 +53,9 @@ Please use the issue tracker for feedback!
\file{qrbill-standalone-demo.tex}{
\from{qrbill.dtx}{qrbill-standalone-demo.tex}
}
+ \file{qrbill-epc-demo.tex}{
+ \from{qrbill.dtx}{qrbill-epc-demo.tex}
+ }
}
\endbatchfile
diff --git a/Master/texmf-dist/tex/latex/qrbill/epc.qrbill-cfg.tex b/Master/texmf-dist/tex/latex/qrbill/epc.qrbill-cfg.tex
index bdfd62f92df..9f0a5b33fae 100644
--- a/Master/texmf-dist/tex/latex/qrbill/epc.qrbill-cfg.tex
+++ b/Master/texmf-dist/tex/latex/qrbill/epc.qrbill-cfg.tex
@@ -28,14 +28,13 @@
%% qrbill.dtx and qrbill.ins, qrbill-vocab.csv
%% and the derived files
%% qrbill.sty, swiss.qrbill-cfg.tex, epc.qrbill-cfg.tex,
-%% qrbill-letter-demo.tex, qrbill-standalone-demo.tex.
+%% qrbill-letter-demo.tex, qrbill-standalone-demo.tex,
+%% and qrbill-epc-demo.tex.
%%
%% The development repository can be found at
%% https://github.com/peitex/qrbill
%% Please use the issue tracker for feedback!
%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\SetQrScheme{
QRType,
Version,
diff --git a/Master/texmf-dist/tex/latex/qrbill/qrbill.sty b/Master/texmf-dist/tex/latex/qrbill/qrbill.sty
index 19048cbe269..a29636f5dee 100644
--- a/Master/texmf-dist/tex/latex/qrbill/qrbill.sty
+++ b/Master/texmf-dist/tex/latex/qrbill/qrbill.sty
@@ -28,16 +28,15 @@
%% qrbill.dtx and qrbill.ins, qrbill-vocab.csv
%% and the derived files
%% qrbill.sty, swiss.qrbill-cfg.tex, epc.qrbill-cfg.tex,
-%% qrbill-letter-demo.tex, qrbill-standalone-demo.tex.
+%% qrbill-letter-demo.tex, qrbill-standalone-demo.tex,
+%% and qrbill-epc-demo.tex.
%%
%% The development repository can be found at
%% https://github.com/peitex/qrbill
%% Please use the issue tracker for feedback!
%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{expl3}
-\ProvidesExplPackage{qrbill}{2023/02/28}{2.00}{
+\ProvidesExplPackage{qrbill}{2023/07/24}{2.01}{
Template for QR-bills based on the Swiss Payment Standards
}
\RequirePackage{iftex}
@@ -59,14 +58,21 @@ Please~use~#2~instead~of~#1,~which~only\\
exists~for~backwards~compatibility~and~will~be~removed.
}
+\tl_new:N \g__qrbill_qrscheme_tl
+
\keys_define:nn {qrbill} {
font .choices:nn = {Frutiger, Arial, Helvetica, Liberation Sans} {
\tl_gset_eq:NN \g__qrbill_font_tl \l_keys_choice_tl
},
font .initial:n = Liberation Sans,
font / custom .code:n = {\tl_gclear:N \g__qrbill_font_tl},
- qrscheme .tl_gset:N = \g__qrbill_qrscheme_tl,
+ qrscheme .choice:,
+ qrscheme / epc .code:n = \tl_gset:Nn \g__qrbill_qrscheme_tl {epc}\tl_gclear:N \g__qrbill_font_tl,
+ qrscheme / unknown .code:n = \tl_gset:Nn \g__qrbill_qrscheme_tl {
+ #1},
qrscheme .initial:n = swiss,
+ qrsize .dim_gset:N = \g_qrbill_QRcode_dim,
+ qrsize .initial:n = 46mm,
creditorprefix .tl_gset:N = \g__qrbill_creditorprefix_tl,
creditorprefix .initial:n = CR-,
debtorprefix .tl_gset:N = \g__qrbill_debtorprefix_tl,
@@ -210,8 +216,6 @@ vrule .initial:n = true,
\RequirePackage{anyfontsize}
}
-\dim_new:N \g_qrbill_QRcode_dim
-\dim_gset:Nn \g_qrbill_QRcode_dim {46mm}
\bool_if:NT \g__qrbill_luamode_bool {
\lua_load_module:n {qrbill-latexluaqrcode}
@@ -219,17 +223,26 @@ vrule .initial:n = true,
\cs_set_protected:Npn \qrbill_qrcode_black: {\rule{\l__qrbill_QRblocksize_dim}{\l__qrbill_QRblocksize_dim}}
\cs_set_protected:Npn \qrbill_qrcode_white: {\rule{\l__qrbill_QRblocksize_dim}{0pt}\rule{0pt}{\l__qrbill_QRblocksize_dim}}
\cs_new:Nn \qrbill_parse_QRcode:n {
-\lua_now:e {
-num, string = printQRcode("\lua_escape:n {#1}")
-}
+ \__qrbill_setup_lua_qrcode:x {#1}
\dim_set:Nn \l__qrbill_QRblocksize_dim {\g_qrbill_QRcode_dim/\lua_now:n {tex.print(num)}}
\let\qrblack\qrbill_qrcode_black:
\let\qrwhite\qrbill_qrcode_white:
\def\qrnewline{\\[\dimexpr-\baselineskip+\l__qrbill_QRblocksize_dim]}
+\raisebox{\dimexpr\depth-\l__qrbill_QRblocksize_dim}[\dimexpr\height+\depth-\l__qrbill_QRblocksize_dim][0pt]{
\noindent\parbox{\g_qrbill_QRcode_dim}{
\lua_now:n {tex.sprint(string)}
+\hss
+}
}
}
+
+\cs_new:Nn \__qrbill_setup_lua_qrcode:n {
+\lua_now:e {
+num, string = printQRcode("\lua_escape:n {#1}")
+}
+}
+
+\cs_generate_variant:Nn \__qrbill_setup_lua_qrcode:n {x}
}
@@ -267,7 +280,7 @@ num, string = printQRcode("\lua_escape:n {#1}")
\cs_set_eq:NN \qr@encode@binary \__qrbill_encode_unicode_binary:n
\raisebox{\depth}{
\__qrbill_enable_unicode_qrcode_patch:
-\qrcode[height= \g_qrbill_QRcode_dim]{#1}
+\qrcode[nolink,height= \g_qrbill_QRcode_dim]{#1}
}
}
@@ -531,7 +544,16 @@ num, string = printQRcode("\lua_escape:n {#1}")
\IfBooleanTF {#1}
{
\qrcode_setup_QRcode:
-\qrbill_parse_QRcode:V \l_qrbill_data_str
+\leavevmode\qrbill_parse_QRcode:V \l_qrbill_data_str
+\tl_if_empty:NF \g_qrbill_icon_tl {
+\llap{\hbox_to_wd:nn {\g_qrbill_QRcode_dim} {
+\hfill
+\raisebox{\dimexpr-.5\height+.5\g_qrbill_QRcode_dim}[0pt][0pt]{
+\includegraphics[width=\g_qrbill_iconwidth_dim]{\g_qrbill_icon_tl}
+}
+\hfill
+}}
+}
}{
\qrbill_bill_create:
}
diff --git a/Master/texmf-dist/tex/latex/qrbill/swiss.qrbill-cfg.tex b/Master/texmf-dist/tex/latex/qrbill/swiss.qrbill-cfg.tex
index 3ca4c8dd296..1e75ca9b389 100644
--- a/Master/texmf-dist/tex/latex/qrbill/swiss.qrbill-cfg.tex
+++ b/Master/texmf-dist/tex/latex/qrbill/swiss.qrbill-cfg.tex
@@ -28,14 +28,13 @@
%% qrbill.dtx and qrbill.ins, qrbill-vocab.csv
%% and the derived files
%% qrbill.sty, swiss.qrbill-cfg.tex, epc.qrbill-cfg.tex,
-%% qrbill-letter-demo.tex, qrbill-standalone-demo.tex.
+%% qrbill-letter-demo.tex, qrbill-standalone-demo.tex,
+%% and qrbill-epc-demo.tex.
%%
%% The development repository can be found at
%% https://github.com/peitex/qrbill
%% Please use the issue tracker for feedback!
%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\qrbillsetup{
creditorprefix=CR-,
debtorprefix=UD-,