texlive[67724] Master/texmf-dist: qrbill (24jul23)

commits+karl at tug.org commits+karl at tug.org
Mon Jul 24 22:22:31 CEST 2023


Revision: 67724
          http://tug.org/svn/texlive?view=revision&revision=67724
Author:   karl
Date:     2023-07-24 22:22:31 +0200 (Mon, 24 Jul 2023)
Log Message:
-----------
qrbill (24jul23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/qrbill/README.md
    trunk/Master/texmf-dist/doc/latex/qrbill/qrbill-letter-demo.tex
    trunk/Master/texmf-dist/doc/latex/qrbill/qrbill-standalone-demo.tex
    trunk/Master/texmf-dist/doc/latex/qrbill/qrbill.pdf
    trunk/Master/texmf-dist/scripts/qrbill/qrbill-latexluaqrcode.lua
    trunk/Master/texmf-dist/source/latex/qrbill/qrbill.dtx
    trunk/Master/texmf-dist/source/latex/qrbill/qrbill.ins
    trunk/Master/texmf-dist/tex/latex/qrbill/epc.qrbill-cfg.tex
    trunk/Master/texmf-dist/tex/latex/qrbill/qrbill.sty
    trunk/Master/texmf-dist/tex/latex/qrbill/swiss.qrbill-cfg.tex

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/qrbill/DEPENDS.txt
    trunk/Master/texmf-dist/doc/latex/qrbill/qrbill-epc-demo.tex

Added: trunk/Master/texmf-dist/doc/latex/qrbill/DEPENDS.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/qrbill/DEPENDS.txt	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/qrbill/DEPENDS.txt	2023-07-24 20:22:31 UTC (rev 67724)
@@ -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


Property changes on: trunk/Master/texmf-dist/doc/latex/qrbill/DEPENDS.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/qrbill/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/qrbill/README.md	2023-07-24 20:22:17 UTC (rev 67723)
+++ trunk/Master/texmf-dist/doc/latex/qrbill/README.md	2023-07-24 20:22:31 UTC (rev 67724)
@@ -4,7 +4,7 @@
 
 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
 
 ***************************************************************************
 
@@ -11,6 +11,10 @@
  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 @@
 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 @@
  * 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

Added: trunk/Master/texmf-dist/doc/latex/qrbill/qrbill-epc-demo.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/qrbill/qrbill-epc-demo.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/qrbill/qrbill-epc-demo.tex	2023-07-24 20:22:31 UTC (rev 67724)
@@ -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 at 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 at 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'.


Property changes on: trunk/Master/texmf-dist/doc/latex/qrbill/qrbill-epc-demo.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/qrbill/qrbill-letter-demo.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/qrbill/qrbill-letter-demo.tex	2023-07-24 20:22:17 UTC (rev 67723)
+++ trunk/Master/texmf-dist/doc/latex/qrbill/qrbill-letter-demo.tex	2023-07-24 20:22:31 UTC (rev 67724)
@@ -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,

Modified: trunk/Master/texmf-dist/doc/latex/qrbill/qrbill-standalone-demo.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/qrbill/qrbill-standalone-demo.tex	2023-07-24 20:22:17 UTC (rev 67723)
+++ trunk/Master/texmf-dist/doc/latex/qrbill/qrbill-standalone-demo.tex	2023-07-24 20:22:31 UTC (rev 67724)
@@ -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}
 

Modified: trunk/Master/texmf-dist/doc/latex/qrbill/qrbill.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/scripts/qrbill/qrbill-latexluaqrcode.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/qrbill/qrbill-latexluaqrcode.lua	2023-07-24 20:22:17 UTC (rev 67723)
+++ trunk/Master/texmf-dist/scripts/qrbill/qrbill-latexluaqrcode.lua	2023-07-24 20:22:31 UTC (rev 67724)
@@ -1,4 +1,4 @@
-qrencode = require("qrencode.lua")
+qrencode = require("qrbill-qrencode.lua")
 
 function printQRcode(codestring)
 	local ok, tab = qrencode.qrcode(codestring, 2)

Modified: trunk/Master/texmf-dist/source/latex/qrbill/qrbill.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/qrbill/qrbill.dtx	2023-07-24 20:22:17 UTC (rev 67723)
+++ trunk/Master/texmf-dist/source/latex/qrbill/qrbill.dtx	2023-07-24 20:22:31 UTC (rev 67724)
@@ -1,6 +1,6 @@
 % \iffalse meta-comment
 %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
 % Copyright (C) 2020–2023 by Marei Peischl (peiTeX) <marei at 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,11 +295,17 @@
 % \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,)]
 % Set the tokenlist to separate the reference codes. See option \latexinline{sep-reference} for
@@ -404,7 +418,7 @@
 % \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.\\
@@ -411,7 +425,7 @@
 % 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,6 +561,8 @@
 	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
@@ -542,8 +569,13 @@
   },
   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 at 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 @@
 
 \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

Modified: trunk/Master/texmf-dist/source/latex/qrbill/qrbill.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/qrbill/qrbill.ins	2023-07-24 20:22:17 UTC (rev 67723)
+++ trunk/Master/texmf-dist/source/latex/qrbill/qrbill.ins	2023-07-24 20:22:31 UTC (rev 67724)
@@ -24,7 +24,8 @@
 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 @@
        \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

Modified: trunk/Master/texmf-dist/tex/latex/qrbill/epc.qrbill-cfg.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/qrbill/epc.qrbill-cfg.tex	2023-07-24 20:22:17 UTC (rev 67723)
+++ trunk/Master/texmf-dist/tex/latex/qrbill/epc.qrbill-cfg.tex	2023-07-24 20:22:31 UTC (rev 67724)
@@ -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,

Modified: trunk/Master/texmf-dist/tex/latex/qrbill/qrbill.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/qrbill/qrbill.sty	2023-07-24 20:22:17 UTC (rev 67723)
+++ trunk/Master/texmf-dist/tex/latex/qrbill/qrbill.sty	2023-07-24 20:22:31 UTC (rev 67724)
@@ -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,6 +58,8 @@
 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
@@ -65,8 +66,13 @@
   },
   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 @@
   \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,20 +223,29 @@
 \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}
+}
+
+
 \bool_if:NF \g__qrbill_luamode_bool {
   \usepackage{qrcode}
   % modified version of \qr at encode@binary to allow utf8 qrcodes required by swiss qrbill scheme
@@ -267,7 +280,7 @@
 \cs_set_eq:NN \qr at 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 @@
 \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:
 }

Modified: trunk/Master/texmf-dist/tex/latex/qrbill/swiss.qrbill-cfg.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/qrbill/swiss.qrbill-cfg.tex	2023-07-24 20:22:17 UTC (rev 67723)
+++ trunk/Master/texmf-dist/tex/latex/qrbill/swiss.qrbill-cfg.tex	2023-07-24 20:22:31 UTC (rev 67724)
@@ -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-,



More information about the tex-live-commits mailing list.