diff options
author | Karl Berry <karl@freefriends.org> | 2023-07-24 20:22:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-07-24 20:22:31 +0000 |
commit | ff358decc98f9c2b462ff4685493a85850279b4f (patch) | |
tree | 5e533937d722016b6539b585d50b2cae88aead86 /Master/texmf-dist/tex | |
parent | e4644c3bdc055b708f195bf28310a681c78814fd (diff) |
qrbill (24jul23)
git-svn-id: svn://tug.org/texlive/trunk@67724 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/qrbill/epc.qrbill-cfg.tex | 5 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/qrbill/qrbill.sty | 46 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/qrbill/swiss.qrbill-cfg.tex | 5 |
3 files changed, 38 insertions, 18 deletions
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-, |