summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/fei/fei.dtx22
-rw-r--r--macros/latex/contrib/fei/fei.pdfbin438409 -> 438626 bytes
-rw-r--r--macros/latex/contrib/pdftexcmds/README.md2
-rw-r--r--macros/latex/contrib/pdftexcmds/pdftexcmds.dtx71
-rw-r--r--macros/latex/contrib/pdftexcmds/pdftexcmds.pdfbin386262 -> 384670 bytes
-rw-r--r--macros/latex/contrib/qrbill/README.md34
-rw-r--r--macros/latex/contrib/qrbill/doc/qrbill.pdfbin0 -> 71638 bytes
-rw-r--r--macros/latex/contrib/qrbill/source/qrbill-vocab.csv14
-rw-r--r--macros/latex/contrib/qrbill/source/qrbill.dtx1083
-rw-r--r--macros/latex/contrib/qrbill/source/qrbill.ins57
-rw-r--r--macros/latex/contrib/qrbill/source/qrbill_swiss-cross.pdfbin0 -> 1153 bytes
11 files changed, 1227 insertions, 56 deletions
diff --git a/macros/latex/contrib/fei/fei.dtx b/macros/latex/contrib/fei/fei.dtx
index 1225ee097a..b2d8b38dfe 100644
--- a/macros/latex/contrib/fei/fei.dtx
+++ b/macros/latex/contrib/fei/fei.dtx
@@ -49,7 +49,7 @@ See http://www.latex-project.org/lppl.txt
\endpreamble
\postamble
-Copyright (C) 2019 by Douglas De Rizzo Meneghetti <douglasrizzo@fei.edu.br>
+Copyright (C) 2020 by Douglas De Rizzo Meneghetti <douglasrizzo@fei.edu.br>
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License (LPPL), either
@@ -94,7 +94,7 @@ fei.cls.
\begin{filecontents*}{\jobname.xmpdata}
\Title {Classe LaTeX FEI}
\Author {Douglas De Rizzo Meneghetti}
-\Copyright {Copyright \copyright\ 2019 "Douglas De Rizzo Meneghetti"}
+\Copyright {Copyright \copyright\ 2020 "Douglas De Rizzo Meneghetti"}
\Keywords {manual\sep latex\sep tipografia}
\Publisher {Baking International}
\Language {pt-BR}
@@ -314,7 +314,7 @@ Para que o arquivo PDF seja gerado com os metadados relevantes, um arquivo com o
\begin{filecontents*}{\jobname.xmpdata}
\Title {Minha tese-dissertação-monografia}
\Author {Meu Nome\sep Nome Do Outro Integrante\sep Nome do Terceiro}
-\Copyright {Copyright \copyright\ 2019 "Douglas De Rizzo Meneghetti"}
+\Copyright {Copyright \copyright\ 2020 "Douglas De Rizzo Meneghetti"}
\Keywords {manual\sep latex\sep tipografia}
\Language {pt-BR}
\Subject {Resumo vai aqui em uma única linha corrida.}
@@ -345,6 +345,7 @@ A classe da FEI pode receber as seguintes opções:
\item \texttt{twoside}: a atualização de 2015 do guia da biblioteca recomenda que trabalhos acadêmicos com mais de 100 páginas sejam impressos em formato \index{frente-e-verso}frente-e-verso. Por ser derivada da classe \texttt{memoir}, a classe da FEI pode receber algumas opções nativas de \texttt{memoir}. Um exemplo de opção que pode ser útil é \texttt{twoside}, a qual alterna o tamanho das margens direita e esquerda das páginas, assim como a posição da numeração, permitindo realizar uma impressão frente-e-verso de melhor qualidade. Alterações adicionais foram realizadas para que todos os elementos pré-textuais sejam corretamente iniciados nas páginas ímpares, como recomenda o guia e a norma. É importante reparar, contudo, que a utilização de \texttt{twoside} acarreta no aumento do número de páginas, uma vez que os versos de algumas páginas no pré-texto podem ser deixados em branco em prol da norma.
\item \texttt{acronym}: passado para o pacote \texttt{glossaries-extra}, sinaliza o uso de abreviaturas no trabalho;
\item \texttt{symbols}: passado para o pacote \texttt{glossaries-extra}, sinaliza o uso de símbolos no trabalho;
+ \item \texttt{backrefs}: passa a opção \texttt{backref} ao pacote \texttt{biblatex}, para que ele imprima as páginas nas quais cada trabalho foi citado nas referências bibliográficas. Repare que esta não é uma características prevista no guia de formatação de referências da biblioteca, então use-o somente sob sua conta e risco;
\item \texttt{record}: passado para o pacote \texttt{glossaries-extra}, sinaliza o uso de um arquivo \texttt{.bib} para definição de símbolos e abreviaturas, a ser compilado pelo programa \index{bib2gls@\texttt{bib2gls}}\texttt{bib2gls}.
\end{enumerate}
@@ -967,7 +968,7 @@ Manuais complementares da Classe \LaTeX{} da FEI de possível interesse para usu
\appendix
-\chapter{\emph{HACKS} ÚTEIS}
+\chapter{\emph{HACKS} ÚTEIS} \label{app:hacks}
Existem alguns casos específicos nos quais técnicas de formatação avançadas ou redefinições de comandos são requeridas. Não existe forma simples de disponibilizar os recursos listados neste apêndice aos usuários da classe, então o apêndice ensinará os usuários a realizar personalizações básicas na classe, assim como fazer formatações menos convencionais que sejam necessárias para aderir as padrões da biblioteca.
@@ -1053,7 +1054,7 @@ Para criar uma nova categoria de \emph{float}, a qual será listada na lista de
\setfloatlocations{mapa}{hbtp} % configurando posicionamento padrão
\end{lstlisting}
-\chapter{ARQUIVOS CRIADOS PELO PROCESSO DE COMPILAÇÃO} \label{chap:arquivos}
+\chapter{ARQUIVOS CRIADOS PELO PROCESSO DE COMPILAÇÃO} \label{app:arquivos}
A seguir, as descrições dos arquivos auxiliares gerados durante o processo de compilação de um documento utilizando a classe \LaTeX{} da FEI e todos os seus recursos.
@@ -1088,7 +1089,7 @@ A seguir, as descrições dos arquivos auxiliares gerados durante o processo de
\end{enumerate}
\end{enumerate}
-\chapter{REFERÊNCIA DE SÍMBOLOS \TeX{}} \label{chap:simbolos}
+\chapter{REFERÊNCIA DE SÍMBOLOS \TeX{}} \label{app:simbolos}
\section{LETRAS GREGAS}
\begin{multicols}{3}
@@ -1312,7 +1313,7 @@ A seguir, as descrições dos arquivos auxiliares gerados durante o processo de
% \fi
%<*class>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{fei}[2020/03/03 4.8 Modelo da FEI]
+\ProvidesClass{fei}[2020/06/28 4.9.1 Modelo da FEI]
% passa a opção draft para a classe
\DeclareOption{draft}{
@@ -1347,7 +1348,6 @@ A seguir, as descrições dos arquivos auxiliares gerados durante o processo de
\sublistfalse
\DeclareOption{sublist}{\sublisttrue}
%---------------------------------------------------------------
-
% opção deposito controla a exibição da folha
% de aprovação e ficha catalográfica
\newif\ifdeposito
@@ -1366,6 +1366,10 @@ A seguir, as descrições dos arquivos auxiliares gerados durante o processo de
\DeclareOption{oneside}{\onesidetrue}
\DeclareOption{twoside}{\onesidefalse}
+\DeclareOption{backrefs}{%
+ \PassOptionsToPackage{backref}{biblatex}%
+}
+
\DeclareOption{algo-as-figure}{\PassOptionsToPackage{figure}{algorithm2e}}%
% opção para configurar a lista de símbolos
@@ -1888,7 +1892,7 @@ A seguir, as descrições dos arquivos auxiliares gerados durante o processo de
\oldprintindex%
}%
-% antigamente, aqui era carregado o pacote hyperref
+% antigamente, aqui era carregado o pacote hyperref.
% como, a partir de 2017, a biblioteca exige que os documentos sejam gerados sob o padrão
% PDF/A, o pacote pdfx é usado no lugar do hyperref por padrão
% em teoria, o pacote hyperref deveria ser o último a ser carregado, porém
diff --git a/macros/latex/contrib/fei/fei.pdf b/macros/latex/contrib/fei/fei.pdf
index 6e21bff80b..ab5532d31b 100644
--- a/macros/latex/contrib/fei/fei.pdf
+++ b/macros/latex/contrib/fei/fei.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdftexcmds/README.md b/macros/latex/contrib/pdftexcmds/README.md
index ab86311304..8c1d58e1dc 100644
--- a/macros/latex/contrib/pdftexcmds/README.md
+++ b/macros/latex/contrib/pdftexcmds/README.md
@@ -1,6 +1,6 @@
# pdftexcmds
-Version: 2020-06-04 v0.32
+Version: 2020-06-27 v0.33
pdftexcmds package for LaTeX
diff --git a/macros/latex/contrib/pdftexcmds/pdftexcmds.dtx b/macros/latex/contrib/pdftexcmds/pdftexcmds.dtx
index 7e9de4e558..e39a5799df 100644
--- a/macros/latex/contrib/pdftexcmds/pdftexcmds.dtx
+++ b/macros/latex/contrib/pdftexcmds/pdftexcmds.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
% File: pdftexcmds.dtx
-% Version: 2020-06-04 v0.32
+% Version: 2020-06-27 v0.33
% Info: Utility functions of pdfTeX for LuaTeX
%
% Copyright (C)
@@ -67,7 +67,7 @@
%
% Installation:
% TDS:tex/generic/pdftexcmds/pdftexcmds.sty
-% TDS:scripts/pdftexcmds/pdftexcmds.lua
+% TDS:tex/generic/pdftexcmds/pdftexcmds.lua
% TDS:doc/latex/pdftexcmds/pdftexcmds.pdf
% TDS:source/latex/pdftexcmds/pdftexcmds.dtx
%
@@ -86,7 +86,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: pdftexcmds 2020-06-04 v0.32 Utility functions of pdfTeX for LuaTeX (HO)}
+\Msg{* Package: pdftexcmds 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -98,7 +98,7 @@
This is a generated file.
Project: pdftexcmds
-Version: 2020-06-04 v0.32
+Version: 2020-06-27 v0.33
Copyright (C)
2007, 2009-2011 Heiko Oberdiek
@@ -155,7 +155,7 @@ and the derived files
}
\def\currentpostamble{\defaultpostamble}%
\generate{%
- \usedir{scripts/pdftexcmds}%
+ \usedir{tex/generic/pdftexcmds}%
\file{pdftexcmds.lua}{\from{pdftexcmds.dtx}{lua}}%
}
@@ -164,12 +164,9 @@ and the derived files
\Msg{************************************************************************}
\Msg{*}
\Msg{* To finish the installation you have to move the following}
-\Msg{* file into a directory searched by TeX:}
+\Msg{* files into a directory searched by TeX:}
\Msg{*}
\Msg{* pdftexcmds.sty}
-\Msg{*}
-\Msg{* And install the following script files:}
-\Msg{*}
\Msg{* pdftexcmds.lua}
\Msg{*}
\Msg{* To produce the documentation run the file `pdftexcmds.drv'}
@@ -196,18 +193,17 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{pdftexcmds.drv}%
- [2020-06-04 v0.32 Utility functions of pdfTeX for LuaTeX (HO)]%
+ [2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2011/11/22]
\usepackage{paralist}
\usepackage{csquotes}
\usepackage[
- backend=bibtex,
- bibencoding=ascii,
- alldates=iso8601,
+ backend=biber,
+ alldates=iso,
]{biblatex}[2011/11/13]
-\bibliography{oberdiek-source}
-\bibliography{pdftexcmds}
+\addbibresource{oberdiek-source.bib}
+\addbibresource{pdftexcmds.bib}
\begin{document}
\DocInput{pdftexcmds.dtx}%
\end{document}
@@ -219,7 +215,7 @@ and the derived files
% \GetFileInfo{pdftexcmds.drv}
%
% \title{The \xpackage{pdftexcmds} package}
-% \date{2020-06-04 v0.32}
+% \date{2020-06-27 v0.33}
% \author{Heiko Oberdiek\thanks
% {Please report any issues at \url{https://github.com/ho-tex/pdftexcmds/issues}}}
%
@@ -597,7 +593,7 @@ and the derived files
\fi
\expandafter\x\csname ver@pdftexcmds.sty\endcsname
\ProvidesPackage{pdftexcmds}%
- [2020-06-04 v0.32 Utility functions of pdfTeX for LuaTeX (HO)]%
+ [2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO)]%
% \end{macrocode}
%
% \subsection{Catcodes}
@@ -693,6 +689,7 @@ and the derived files
%
% \begin{macrocode}
\ifluatex
+ \ifcsname catcodetable@string\endcsname\else\input{ltluatex}\fi
\else
\def\pdftexcmds@nopdftex{%
\let\pdftexcmds@nopdftex\relax
@@ -772,6 +769,7 @@ and the derived files
\expandafter\ifx\csname pdf#1\endcsname\relax\else pdf\fi#1\endcsname\relax
\pdftexcmds@nopdftex
\else
+ \begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\let\csname pdf@#1\expandafter\endcsname
\csname\expandafter\ifx\csname pdf#1\endcsname\relax\else pdf\fi#1\endcsname
\fi
@@ -1137,7 +1135,7 @@ and the derived files
\fi
\fi
\begingroup
- \def\x{2020-06-04 v0.32}%
+ \def\x{2020-06-27 v0.33}%
\ltx@onelevel@sanitize\x
\edef\y{%
\pdftexcmds@directlua{%
@@ -1544,7 +1542,7 @@ local pdftexcmds = oberdiek.pdftexcmds or {}
oberdiek.pdftexcmds = pdftexcmds
local systemexitstatus
function pdftexcmds.getversion()
- tex.write("2020-06-04 v0.32")
+ tex.write("2020-06-27 v0.33")
end
% \end{macrocode}
%
@@ -1933,7 +1931,7 @@ end
% \begin{macrocode}
%</lua>
% \end{macrocode}
-%% \section{Installation}
+% \section{Installation}
%
% \subsection{Download}
%
@@ -1944,31 +1942,6 @@ end
% \item[\CTAN{macros/latex/contrib/pdftexcmds/pdftexcmds.pdf}] Documentation.
% \end{description}
%
-%
-% \paragraph{Bundle.} All the packages of the bundle `pdftexcmds'
-% are also available in a TDS compliant ZIP archive. There
-% the packages are already unpacked and the documentation files
-% are generated. The files and directories obey the TDS standard.
-% \begin{description}
-% \item[\CTANinstall{install/macros/latex/contrib/pdftexcmds.tds.zip}]
-% \end{description}
-% \emph{TDS} refers to the standard ``A Directory Structure
-% for \TeX\ Files'' (\CTANpkg{tds}). Directories
-% with \xfile{texmf} in their name are usually organized this way.
-%
-% \subsection{Bundle installation}
-%
-% \paragraph{Unpacking.} Unpack the \xfile{pdftexcmds.tds.zip} in the
-% TDS tree (also known as \xfile{texmf} tree) of your choice.
-% Example (linux):
-% \begin{quote}
-% |unzip pdftexcmds.tds.zip -d ~/texmf|
-% \end{quote}
-%
-% \paragraph{Script installation.}
-% Check the directory \xfile{TDS:scripts/pdftexcmds/} for
-% scripts that need further installation steps.
-%
% \subsection{Package installation}
%
% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting
@@ -1985,7 +1958,7 @@ end
% \def\t{^^A
% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
% pdftexcmds.sty & tex/generic/pdftexcmds/pdftexcmds.sty\\
-% pdftexcmds.lua & scripts/pdftexcmds/pdftexcmds.lua\\
+% pdftexcmds.lua & tex/generic/pdftexcmds/pdftexcmds.lua\\
% pdftexcmds.pdf & doc/latex/pdftexcmds/pdftexcmds.pdf\\
% pdftexcmds.dtx & source/latex/pdftexcmds/pdftexcmds.dtx\\
% \end{tabular}^^A
@@ -2256,6 +2229,12 @@ end
% \begin{Version}{2020-06-04 v0.32}
% \item Updated pdftexcmds.elapsedtime to lua 5.3 (issue 4).
% \end{Version}
+% \begin{Version}{2020-06-24 v0.33}
+% \item avoid that \cs{pdfelapsedtime} and \cs{pdfresettimer} are set to \cs{relax}
+% when using xelatex (issue 5).
+% \item load ltluatex when using plain so that the catcode tables are
+% available.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/macros/latex/contrib/pdftexcmds/pdftexcmds.pdf b/macros/latex/contrib/pdftexcmds/pdftexcmds.pdf
index b75aed4a3a..67c62c826a 100644
--- a/macros/latex/contrib/pdftexcmds/pdftexcmds.pdf
+++ b/macros/latex/contrib/pdftexcmds/pdftexcmds.pdf
Binary files differ
diff --git a/macros/latex/contrib/qrbill/README.md b/macros/latex/contrib/qrbill/README.md
new file mode 100644
index 0000000000..745b4ed75f
--- /dev/null
+++ b/macros/latex/contrib/qrbill/README.md
@@ -0,0 +1,34 @@
+# qrbill – create QR-bills based on the swiss payment standard
+
+Copyright (C) Marei Peischl (peiTeX) <marei@peitex.de>, 2020
+
+This work is part of a collaborative project of Marei Peischl (peiTeX) and Alex Antener (foobar LLC).
+
+qrbill 2020/06/28 v1.0
+
+***************************************************************************
+
+ 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.
+
+***************************************************************************
+
+## Provided files
+
+* README.md
+* qrbill.dtx
+* qrbill.ins
+* qrbill-vocab.csv
+
+The files
+* qrbill.sty
+* swiss.qrbill-cfg.tex
+as well as the demo files
+* qrbill-standalone-demo.tex
+* qrbill-letter-demo.tex
+can be created from the qrbill.dtx by processing the qrbill.ins-file.
+
+
+## Version History
+
+ * v1.00 First official version - published on 2020-06-28 \ No newline at end of file
diff --git a/macros/latex/contrib/qrbill/doc/qrbill.pdf b/macros/latex/contrib/qrbill/doc/qrbill.pdf
new file mode 100644
index 0000000000..e8cb0644fc
--- /dev/null
+++ b/macros/latex/contrib/qrbill/doc/qrbill.pdf
Binary files differ
diff --git a/macros/latex/contrib/qrbill/source/qrbill-vocab.csv b/macros/latex/contrib/qrbill/source/qrbill-vocab.csv
new file mode 100644
index 0000000000..e9df8266ac
--- /dev/null
+++ b/macros/latex/contrib/qrbill/source/qrbill-vocab.csv
@@ -0,0 +1,14 @@
+language,{ngerman, german, nswissgerman, swissgerman},{french},{italian},{english,british,american}
+paymentpart,Zahlteil,Section paiement,Sezione pagamento,Payment part
+account,Konto / Zahlbar an,Compte / Payable à,Conto / Pagabile a,Account / Payable to
+reference,Referenz,Référence,Riferimento,Reference
+addinfo,Zusätzliche Informationen,Informations additionnelles,Informazioni aggiuntive,Additional information
+furtherinfo,Weitere Informationen,Informations supplémentaires,Informazioni supplementari,Further information
+currency,Währung,Monnaie,Valuta,Currency
+amount,Betrag,Montant,Importo,Amount
+receipt,Empfangsschein,Récépissé,Ricevuta,Receipt
+acceptant,Annahmestelle,Point de dépôt,Punto di accettazione,Acceptance point
+separate,Vor der Einzahlung abzutrennen,A détacher avant le versement,Da staccare prima del versamento,Separate before paying in
+debtor,Zahlbar durch,Payable par,Pagabile da,Payable by
+debtoraddr,Zahlbar durch (Name/Adresse),Payable par (nom/adresse),Pagabile da (nome/indirizzo),Payable by (name/address)
+infavourof,Zugunsten,En faveur de,A favore di,In favour of \ No newline at end of file
diff --git a/macros/latex/contrib/qrbill/source/qrbill.dtx b/macros/latex/contrib/qrbill/source/qrbill.dtx
new file mode 100644
index 0000000000..3d4fabcec5
--- /dev/null
+++ b/macros/latex/contrib/qrbill/source/qrbill.dtx
@@ -0,0 +1,1083 @@
+% \iffalse meta-comment
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Copyright (C) 2020 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, qrbill-letter-demo.tex,
+% qrbill-standalone-demo.tex .
+%
+% The development repository can be found at
+% https://github.com/peitex/qrbill
+% Please use the issue tracker for feedback!
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \fi
+% \iffalse
+%<*package>
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%</package>
+% \fi
+% \iffalse
+%<*driver>
+\ProvidesFile{qrbill.dtx}[2020/06/28 v1.0 \ create QR-bills based on the Swiss standard]
+\documentclass[english, parskip=half-]{scrartcl}
+\usepackage{iftex}
+\ifPDFTeX
+\usepackage[T1]{fontenc}
+\fi
+\usepackage{doc}
+\usepackage[cache, langlinenos]{minted}
+% Need to set the style here so that it is defined and brought in here.
+% If the style is set later, then docstrip interferes with any comments in
+% the style definition so that they appear as literal text in the document.
+
+\setminted{style=default, tabsize=4}
+\newminted{latex}{gobble=4,escapeinside=||}
+
+\newenvironment{doccode}{
+ \VerbatimEnvironment
+ \begin{VerbatimOut}[gobble=1, tabsize=4]{minted.doc.out}}
+ {\end{VerbatimOut}
+ \inputminted[autogobble, escapeinside=||,tabsize=4]{latex}{minted.doc.out}
+}
+
+\usepackage{babel}
+\usepackage[babel]{csquotes}
+
+\EnableCrossrefs
+\PageIndex
+\RecordChanges
+\newmintinline[code]{latex}{}
+
+\newcommand*\repl[1]{\meta{#1}}
+\newcommand*\opt[1]{\colorbox{black!20}{\meta{#1}}}
+\newcommand*\marg[1]{%
+ {\ttfamily\char`\{}\repl{#1}{\ttfamily\char`\}}}
+\newcommand*\oarg[1]{%
+ {\ttfamily[}\opt{#1}{\ttfamily]}
+}
+\newcommand*{\sarg}{\texttt{*}}
+
+\usepackage{xparse}
+
+\OnlyDescription
+\makeatletter
+
+\def\qrbill@optionNoDefault #1(#2) (#3){%
+ \vspace{0.1in}%
+ \leavevmode%
+ \marginpar{\raggedleft\small\ttfamily#1\ }%
+ \kern-\parindent\textsf{(#2)}\hfill#3\\}
+
+
+\def\qrbill@option #1 (#2) (#3){%
+ \qrbill@optionNoDefault#1(#2) ({(default: \texttt{#3})})%
+}
+
+\ExplSyntaxOn
+
+\newcommand*\qrbill@nextopt{}%
+\newenvironment{optionlist}%
+{%
+ \par\vspace{-.5\baselineskip}
+ \def\pipechar{|}%
+ \let\|\pipechar%
+ \RenewDocumentCommand{\item}{sr[]}{%
+ \qrbill@nextopt%
+ \renewcommand*\qrbill@nextopt{\par}%
+ \IfBooleanTF {##1}%
+ {\qrbill@optionNoDefault ##2}%
+ {\qrbill@option ##2}%
+}}
+{%
+ \par}
+\ExplSyntaxOff
+
+
+
+% Create a short verbatim pipe that handles quotation marks properly
+\begingroup
+\catcode`\|=\active
+\gdef\pipe@active@verbatim{%
+ \begingroup
+ \let\do\@makeother\dospecials
+ \catcode`\|=\active
+ \catcode`\`=\active
+ \catcode`\'=\active
+ \catcode`\<=\active
+ \catcode`\>=\active
+ \catcode`\-=\active
+ \catcode`\,=\active
+ \catcode`\ =\active
+ \pipe@active@verbatim@i}
+\gdef\pipe@active@verbatim@i#1|{%
+ \endgroup
+ \begingroup
+ \def\FV@SV@pipe@active@verbatim{%
+ \FV@Gobble
+ \expandafter\FV@ProcessLine\expandafter{#1}}%
+ \BUseVerbatim{pipe@active@verbatim}%
+ \endgroup}
+\AtBeginDocument{\let|\pipe@active@verbatim}
+\endgroup
+\makeatother
+
+\usepackage{array}
+\usepackage{booktabs}
+
+\usepackage{qrbill}
+
+\usepackage[hidelinks]{hyperref}
+
+\begin{document}
+\DocInput{qrbill.dtx}
+\end{document}
+%</driver>
+%\fi
+%
+% \changes{v1.0}{2020/06/28}{First official version}
+%
+% \GetFileInfo{qrbill.dtx}
+%
+% \DoNotIndex{\newcommand,\newenvironment}
+% \title{qrbill}
+% \subtitle{\LaTeX-package to create QR-bills based on the Swiss payments standards}
+% \author{Marei Peischl \href{mailto:marei@peitex.de}{<marei@peitex.de>}}
+% \publishers{A collaborative project of pei\TeX{} and foobar LLC}
+% \date{\filedate}
+% \maketitle
+% \section{Introduction}
+% qrbill.sty, the \LaTeX-package, is the Free Software and Open Source answer to the launch of the swiss payments conversion, introduced mid 2020, replacing the former payment order slip by a restructured, QR enhanced slip. The published source code is based on the payment standard guidelines issued for Switzerland and intentionally has a modular structure to enable further development and adaptation for international use.
+%
+% 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}
+% \fi
+% \section{Example of use}
+% The easies way to use the qrbill package is to create a bill with the standalone documentclass:
+%
+% \begin{doccode}
+% \documentclass{standalone}
+% \usepackage[ngerman]{babel}
+%
+% \usepackage{xcolor}
+% \usepackage{qrbill}
+%
+% \begin{document}
+%
+% \QRbill[
+% creditor={foobar LLC\\
+% Postfach 404\\
+% 2342 Zurich\\
+% CH},
+% Account=CH1280808005649899718,
+% % insert additional data here
+% ]
+%
+% \end{document}
+% \end{doccode}
+%
+% \DescribeMacro{\QRbill}\oarg{Data Setup}
+% The macro \code{\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.
+%
+% There is also an example in the appendix showing all data fields (see appendix \ref{standalone-complete} on page \pageref{standalone-complete}).
+%
+% The headings are provided in German, English, Italian and French and will be translated using the document's language setup. The terms have been taken from the official guidelines.
+%
+% \section{Technical Requirements}
+% qrbill has been built for \TeX Live 2020. Currently it is not possible to ensure it's functionality with older Releases of \TeX Distributions.
+%
+% The packages loaded by qrbill are:
+% \begin{itemize}
+% \item expl3
+% \item fontspec (except one is using a custom font setup)
+% \item graphicx
+% \item scrbase (which is part of the koma-script bundle)
+% \item qrcode
+% \item iftex
+% \item l3keys2e
+% \item numprint
+% \end{itemize}
+%
+% As a default font \enquote{Liberation Sans} will be used. This will be loaded using fontspec, which would require the use of Lua\LaTeX{} or Xe\LaTeX{} as a compiler. To have a workaround for this, see the \code{font} option on page \pageref{opt:font} for a custom font setup.
+%
+% \section{Package options}
+%
+% \begin{optionlist}
+%
+% \item[billinginfo (true/false) (true)]
+% Activate/deactivate the automatic fill of the BillingInformation. If this is set to \code{false} one still can add data to this field using the \code{BillingInformation} key, as Described in section \ref{sec:data-setup}.
+%
+% \item[creditorprefix\\debtorprefix (String) (CR-/UD-)]
+% For custom setups the predefined prefixes for the debtor and creditoraddress can be changes. The initial configuration is a requirement of the Swiss standards.
+%
+% \item[font (Frutiger/Arial/Helvetica/Liberation Sans/custom) (Liberation Sans)]
+% \label{opt:font}
+% The official guideline for the Swiss qrbill limits the choice of the font to the first four values of this option. The font selection and sizes currently hardcoded to fit to the size. Custom setups might be provided in the future.
+%
+% In case one wants to use a custom font, you can set the option \code{font=custom}. This will disable all font setup and not prevent the fontspec package from being loaded. You can redefine the macro \code{qrbillfont} to use any font available on your system, for example:
+% \begin{doccode}
+% \usepackage{fontspec}
+% % The Laconic font has to be installed
+% \renewcommand*{\qrbillfont}{\fontspec{Laconic}}
+% \end{doccode}
+%
+% \item[frame (true/false/top/bottom) (true)]
+% Switch to disable the frame around the created QRbill. The top/bottom options should be prefered when the bill is embedded into a document of a4 papersize.
+%
+% \item[icon (swiss-cross/filename) (<empty>)]
+% The swiss standard describes the placement of a swiss-cross icon in the center of the QRcode. This can be achieved using this option. The default is set empty, so no icon will be placed. If this option holds another string than \enquote{swiss-cross} it will be interpreted as filename and try to load a custom image.
+%
+% \item[iconwidth (length) (7mm)]
+% This option allows custom scaling for custom icons.
+
+% \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.
+% \end{optionlist}
+%
+% \section{Data setup}
+% \label{sec:data-setup}
+% \DescribeMacro{\qrbillsetdata}
+% The data fields can be filled either using the optional argument of \code{\QRbill} or using the macro \code{\qrbillsetdata}. Section \ref{sec:data-complete} shows a list of all available fields and appendix \ref{standalone-complete} provides an example of use. For further information on the construction of the QRcode see the specification \cite{qrbill-spec}.
+%
+% To simplify the usage qrbill provides an interface to use the different types of address data and is able to create a \enquote{billing information} string as described in \cite{qrbill-spec} using the single data elements.
+%
+% \section{Setup for the preconfigured Swiss QR-bill}
+% \subsection{Preconfigured data}
+% The initial configuration which uses the Swiss standard already adds the following data:
+% \begin{doccode}
+% \SetupQrBill{
+% QRType=SPC,
+% Version=0210,
+% CodingType=1,
+% Trailer=EPD,
+% }
+% \end{doccode}
+% These fields are currently required to use these values. If any future changes on the standard would require changes, they can be overwritten or redefined by using a custom implementation file, similar to swiss.qrbill-cfg.tex.
+%
+% Additionally the Currency has been initialized to use \enquote{CHF}. This also can be overwritten. Currently the Swiss standards only allow the values \code{CHF} or \code{EUR}.
+% \subsection{Address data}
+% The Swiss payment standards for QR-bills require the following data for the address of creditor (Prefix \code{CR-}) and debtor (Prefix \code{UD-}):
+% \begin{center}
+% \begin{tabular}{@{}>{\ttfamily}l>{\centering}p{.25\linewidth}>{\centering\arraybackslash}p{.25\linewidth}@{}}
+% \toprule
+% AddressType&K&S\\\cmidrule(r){1-1}\cmidrule(l){2-3}
+% Name& \multicolumn{2}{c}{Name}\\\cmidrule(r){1-1}\cmidrule(l){2-3}
+% Address1&Street&Street with number\\\cmidrule(r){1-1}\cmidrule(l){2-3}
+% Address2&Number&Postal code with City\\\cmidrule(r){1-1}\cmidrule(l){2-3}
+% ZIP&Postal code& Enforced Empty\\\cmidrule(r){1-1}\cmidrule(l){2-3}
+% City& City& Enforced Empty\\\cmidrule(r){1-1}\cmidrule(l){2-3}
+% Country& \multicolumn{2}{c}{Country Code}\\\bottomrule
+% \end{tabular}
+% \end{center}
+% To set an address of type \enquote{K} one can use they option key \code{debtor} or \code{creditor}. Type \enquote{S} can be achieved using the starred variant (\code{debtor*}/\code{creditor*}).
+%
+% \begin{minipage}{.5\linewidth}
+% \begin{doccode}
+% creditor={Name\\
+% Street Nr.\\
+% PostalCode City\\
+% CountryCode},
+% \end{doccode}
+% \end{minipage}%
+% \begin{minipage}{.5\linewidth}
+% \begin{doccode}
+% creditor*={Name\\
+% Street\\
+% Nr.\\
+% PostalCode\\
+% City\\
+% CountryCode},
+% \end{doccode}
+% \end{minipage}
+%
+% \subsection{Billing information}
+% The billing information is a string which can consist of the following data elements:
+% \begin{tabular}{@{}>{\ttfamily}ll@{}}
+% invoicenum & invoice number\\
+% invoicedate & invoice data \\
+% customerref & customer reference \\
+% vat & VAT number\\
+% vatdate& VAT date\\
+% vatdetails& VAT percentage / details\\
+% importvat& import VAT\\
+% conditions& payment conditions\\
+% \end{tabular}
+% The data has to be in the required format. qrbill might add features to automatically validate this in the future.
+%
+% Beside setting the data fields all on their own, qrbill can also handle a complete billing information string. One could simply set it by
+%
+% \begin{doccode}
+% BillingInfo=//S1/10/10201409/11/190512/20/1400.000-53/30/106017086
+% /31/180508/32/7.7/40/2:10;0:30
+% \end{doccode}
+% \subsection{AV-Parameters}
+% The QRcode can use 2 AV Parameters. They have to carry the Prefix of \enquote{Name AV1:}/\enquote{Name AV2:}. This will be automatically added if the keys \code{AV1}/\code{AV2} are used instead of \code{AV1-Parameters}/\code{AV2-Parameters}.
+%
+% \subsection{Remaining data elements}
+% The remaining data elements should be set directly.
+% For restrictions on the content see the specification. Currently there is no validation taking place.
+% The remaining for the preconfigures Swiss standard are:
+% Account,
+% Amount,
+% ReferenceType,
+% Reference,
+% Message,
+%
+% \subsection{The Swiss cross icon}
+% \cite{qrbill-design} reguires a swiss cross of 7\,mm size to be placed in the center of the QRcode.
+% This package supports this by using the package option for the icon:
+% \begin{doccode}
+% \usepackage[icon=swiss-cross, …]{qrbill}
+% \end{doccode}
+% This setting is not activated by default.
+%
+%
+% \subsection{Overview over all data fields}
+% \label{sec:data-complete}
+% Data fields which are used in the QRcode:\par
+% \ExplSyntaxOn
+% \seq_use:Nn \g__qrbill_qrscheme_seq {\\}
+% \ExplSyntaxOff
+% \par\medskip
+% Data fields, which are custom created by the qrbill package to simplify the use:\par
+% creditor and creditor*\\
+% debtor and debtor*\\
+% AV1 and AV2
+% \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)\\}
+% \ExplSyntaxOff
+% \iffalse
+% \section{Implementation}
+% \begin{macrocode}
+\RequirePackage{expl3}
+\ProvidesExplPackage{qrbill}{2020/06/28}{1.0}{
+ Template for QR-bills based on the Swiss Payment Standards
+}
+\RequirePackage{iftex}
+\RequirePackage{l3keys2e}
+
+\tl_new:N \g__qrbill_font_tl
+\bool_new:N \g__qrbill_top_frame_bool
+\bool_new:N \g__qrbill_bottom_frame_bool
+\bool_new:N \g__qrbill_left_frame_bool
+\bool_new:N \g__qrbill_right_frame_bool
+
+\keys_define:nn {qrbill} {
+ font .choices:nn = {Frutiger, Arial, Helvetica, Liberation Sans} {
+ \bool_gset_true:N \g__qrbill_fontsetup_bool
+ \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 .initial:n = swiss,
+ creditorprefix .tl_gset:N = \g__qrbill_creditorprefix_tl,
+ creditorprefix .initial:n = CR-,
+ debtorprefix .tl_gset:N = \g__qrbill_debtorprefix_tl,
+ debtorprefix .initial:n = UD-,
+ qrmode .choice:,
+ qrmode / package .code:n = \bool_gset_false:N \g__qrbill_luamode_bool,
+ qrmode / lua .code:n = \bool_gset_true:N \g__qrbill_luamode_bool,
+ qrmode .initial:n = package,
+ frame .choice:,
+ frame / false .code:n = {
+ \bool_gset_false:N \__g__qrbill_top_frame_bool
+ \bool_gset_false:N \g__qrbill_bottom_frame_bool
+ \bool_gset_false:N \g__qrbill_left_frame_bool
+ \bool_gset_false:N \g__qrbill_right_frame_bool
+ },
+ frame / true .code:n = {
+ \bool_gset_true:N \g__qrbill_top_frame_bool
+ \bool_gset_true:N \g__qrbill_bottom_frame_bool
+ \bool_gset_true:N \g__qrbill_left_frame_bool
+ \bool_gset_true:N \g__qrbill_right_frame_bool
+ },
+ frame / top .code:n = {
+ \bool_gset_true:N \g__qrbill_top_frame_bool
+ \bool_gset_false:N \g__qrbill_bottom_frame_bool
+ \bool_gset_false:N \g__qrbill_left_frame_bool
+ \bool_gset_false:N \g__qrbill_right_frame_bool
+ },
+ frame / bottom .code:n = {
+ \bool_gset_false:N \g__qrbill_top_frame_bool
+ \bool_gset_true:N \g__qrbill_bottom_frame_bool
+ \bool_gset_false:N \g__qrbill_left_frame_bool
+ \bool_gset_false:N \g__qrbill_right_frame_bool
+ },
+ frame .initial:n = true,
+ billinginfo .bool_gset:N = \g__grbill_billinginfo_auto_bool,
+ billinginfo .default:n = true,
+ billinginfo .initial:n = true,
+ icon .choice:,
+ icon / swiss-cross .meta:n = {icon=qrbill_swiss-cross.pdf},
+ icon / unknown .code:n = \tl_gset:Nn \g_qrbill_icon_tl {#1},
+ icon .initial:n =,
+ iconwidth .dim_gset:N = \g_qrbill_iconwidth_dim,
+ iconwidth .initial:n = 7mm,
+}
+
+\ProcessKeysOptions{qrbill}
+
+\newcommand*{\qrbillsetup}[1]{\keys_set:nn {qrbill}{#1}}
+\newcommand*{\qrbillsetdata}[1]{\keys_set:nn {qrbill/data}{#1}}
+
+\tl_if_empty:NTF \g__qrbill_font_tl {
+ \def\qrbillfont{\normalfont}
+}{
+ \RequirePackage{fontspec}
+ \newfontfamily{\qrbillfont}{\g__qrbill_font_tl}
+}
+
+\dim_new:N \g_qrbill_QRcode_dim
+\dim_gset:Nn \g_qrbill_QRcode_dim {46mm}
+\bool_if:NF \g__qrbill_luamode_bool {
+ \usepackage{qrcode}
+ \cs_new:Nn \qrbill_parse_QRcode:n {
+ \raisebox{\depth}{\qrcode[height= \g_qrbill_QRcode_dim]{#1}}
+ }
+ \cs_generate_variant:Nn \qrbill_parse_QRcode:n {V}
+}
+
+\RequirePackage{scrbase}
+\RequirePackage{graphicx}
+\RequirePackage{numprint}
+\npthousandsep{\,}
+\npdecimalsign{.}
+
+\dim_new:N \g__qrbill_rule_dim
+\dim_gset:Nn \g__qrbill_rule_dim {.5pt}
+\dim_const:Nn \c_qrbill_sep_dim {5mm}
+\dim_const:Nn \c_qrbill_width_dim {210mm}
+\dim_const:Nn \c_qrbill_height_dim {105mm}
+
+\cs_new:Nn \qrbill_title_font: {\fontsize{11bp}{11bp}\selectfont\bfseries}
+
+\cs_new:Nn \qrbill_headingR_font: {\fontsize{6bp}{9bp}\selectfont\bfseries}
+\cs_new:Nn \qrbill_valueR_font: {\fontsize{8bp}{9bp}\selectfont}
+\cs_new:Nn \qrbill_amountR_font: {\fontsize{8bp}{11bp}\selectfont}
+\cs_new:Nn \qrbill_acceptance_font: {\fontsize{6bp}{8bp}\selectfont\bfseries}
+
+\cs_new:Nn \qrbill_headingP_font: {\fontsize{8bp}{11bp}\selectfont\bfseries}
+\cs_new:Nn \qrbill_valueP_font: {\fontsize{10bp}{11bp}\selectfont}
+\cs_new:Nn \qrbill_amountP_font: {\fontsize{10bp}{13bp}\selectfont}
+
+\cs_new:Nn \qrbill_infoheading_font: {\fontsize{7bp}{8bp}\selectfont\bfseries}
+\cs_new:Nn \qrbill_info_font: {\fontsize{7bp}{8bp}\selectfont}
+
+\dim_new:N \g_qrbill_placeholder_rule_dim
+\dim_gset:Nn \g_qrbill_placeholder_rule_dim {.75pt}
+\dim_new:N \g_qrbill_placeholder_corner_dim
+\dim_gset:Nn \g_qrbill_placeholder_corner_dim {3mm}
+\cs_new:Nn \__qrbill_placeholder_hmark: {
+ \rule{\g_qrbill_placeholder_corner_dim}{\g_qrbill_placeholder_rule_dim}
+}
+\cs_new:Nn \__qrbill_placeholder_vmark: {
+ \rule{\g_qrbill_placeholder_rule_dim}{\g_qrbill_placeholder_corner_dim}
+}
+
+
+\cs_new:Nn \__qrbill_placeholder:nn {
+ \vbox_to_ht:nn {#2} {
+ \hbox_to_wd:nn {#1} {\__qrbill_placeholder_hmark: \hfill \__qrbill_placeholder_hmark:}
+ \nointerlineskip
+ \hbox_to_wd:nn {#1} {\__qrbill_placeholder_vmark: \hfill \__qrbill_placeholder_vmark:}
+ \vfill
+ \hbox_to_wd:nn {#1} {\__qrbill_placeholder_vmark: \hfill \__qrbill_placeholder_vmark:}
+ \nointerlineskip
+ \hbox_to_wd:nn {#1} {\__qrbill_placeholder_hmark: \hfill \__qrbill_placeholder_hmark:}
+ }
+}
+
+\cs_new:Nn \qrbill_bill_create: {
+ \begingroup
+ \qrbill_parse_BillingInfo:
+ \qrbillfont
+ \setlength{\parindent}{\z@}
+ \parbox{\c_qrbill_width_dim }{
+ \vbox to \c_qrbill_height_dim {
+ \bool_if:NTF \g__qrbill_top_frame_bool
+ {\rule{\c_qrbill_width_dim}{\g__qrbill_rule_dim}}
+ {\rule{\c_zero_dim}{\g__qrbill_rule_dim}}
+ \par\nointerlineskip
+ \skip_vertical:n {\c_qrbill_sep_dim-\g__qrbill_rule_dim}
+ \skip_horizontal:n {\c_qrbill_sep_dim-\g__qrbill_rule_dim}
+ \begin{minipage}[c][95mm][t]{52mm}
+ \vbox_to_ht:nn {7mm} {\qrbill_title_font:\qrbillreceiptname}
+ \par\nointerlineskip
+ \vbox_to_ht:nn {56mm}{
+ {\qrbill_headingR_font:\qrbillaccountname\par}
+ {
+ \qrbill_valueR_font:\tl_use:c {l_qrbill_data_Account_tl}\par
+ \qrbill_insert_address:N \g__qrbill_creditorprefix_tl
+ \par\vskip\baselineskip
+ }
+ \tl_if_empty:NF \l_qrbill_data_Reference_tl {
+ {\qrbill_headingR_font:\qrbillreferencename\par}
+ {
+ \qrbill_valueR_font:\tl_use:c {l_qrbill_data_Reference_tl}
+ \par\vskip\baselineskip
+ }
+ }
+ \tl_if_empty:cTF {l_qrbill_data_\g__qrbill_debtorprefix_tl Name_tl}
+ {
+ {\qrbill_headingR_font:\qrbilldebtoraddrname\par}
+ \__qrbill_placeholder:nn {52mm} {20mm}
+ }{
+ {\qrbill_headingR_font:\qrbilldebtorname\par}
+ {
+ \qrbill_valueR_font:
+ \qrbill_insert_address:N \g__qrbill_debtorprefix_tl
+ \par
+ }
+ }
+ }
+ \par\nointerlineskip
+ \vbox_to_ht:nn {14mm}{
+ \qrbill_headingR_font:
+ \begin{tabular}[t]{@{}ll@{}}
+ \qrbillcurrencyname&\qrbill_headingR_font:\qrbillamountname\\
+ \qrbill_amountR_font:\l_qrbill_data_Currency_tl
+ &\qrbill_amountR_font:
+ \tl_if_empty:NF \l_qrbill_data_Amount_tl
+ {\numprint{\l_qrbill_data_Amount_tl}}
+ \end{tabular}
+ \tl_if_empty:NTF \l_qrbill_data_Amount_tl {
+ \hfill
+ \raisebox{\dimexpr-\height+\ht\strutbox}[\z@]{\llap{
+ \__qrbill_placeholder:nn {30mm} {10mm}
+ }}
+ }
+ \vfill
+ }
+ \par\nointerlineskip
+ \vbox_to_ht:nn {18mm} {
+ \makebox[\linewidth][r]{\qrbill_headingR_font:\qrbillacceptantname}\par
+ }
+ \end{minipage}%
+ \skip_horizontal:n {2\c_qrbill_sep_dim}
+ \begin{minipage}[c][95mm][t]{138mm}
+ \begin{minipage}[c][85mm][t]{51mm}
+ {\qrbill_title_font:\qrbillpaymentpartname}
+ \par\nointerlineskip
+ \skip_vertical:n {\c_qrbill_sep_dim}
+ \qrcode_setup_QRcode:
+ \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
+ }}
+ }
+ \skip_vertical:n {\c_qrbill_sep_dim}
+ \vbox_to_ht:nn {22mm}{
+ \begin{tabular}[b]{@{}ll@{}}
+ \qrbill_headingP_font:\qrbillcurrencyname&\qrbill_headingP_font:
+ \qrbillamountname\\
+ \qrbill_amountP_font:\tl_use:c {l_qrbill_data_Currency_tl}&
+ \tl_if_empty:NF \l_qrbill_data_Amount_tl {
+ \qrbill_amountP_font:\numprint{\l_qrbill_data_Amount_tl}
+ }
+ \end{tabular}
+ \tl_if_empty:NTF \l_qrbill_data_Amount_tl {
+ \hfill
+ \raisebox{\dimexpr-\height+\ht\strutbox}[\z@]{
+ \llap{\__qrbill_placeholder:nn {40mm} {15mm}
+ }}
+ }
+ }
+ \end{minipage}
+ \begin{minipage}[c][85mm][t]{87mm}
+ \par\nointerlineskip
+ {\qrbill_headingP_font:\qrbillaccountname\par}
+ {
+ \qrbill_valueP_font:\tl_use:c {l_qrbill_data_Account_tl}\par
+ \qrbill_insert_address:N \g__qrbill_creditorprefix_tl
+ \par\vskip\baselineskip
+ }
+ \tl_if_empty:NF \l_qrbill_data_Reference_tl {
+ {\qrbill_headingP_font:\qrbillreferencename\par}
+ {\qrbill_valueP_font:\tl_use:c {l_qrbill_data_Reference_tl}
+ \par\vskip\baselineskip}
+ }
+ \exp_args:Nf \tl_if_empty:nF {
+ \l_qrbill_data_BillingInfo_tl
+ \l_qrbill_data_Message_tl
+ }{
+ {\qrbill_headingP_font:\qrbilladdinfoname\par}
+ {
+ \qrbill_valueP_font:
+ \l_qrbill_data_Message_tl\par
+ \tl_replace_all:Nnn \l_qrbill_data_BillingInfo_tl {/} {\discretionary{}{}{}/}
+ \l_qrbill_data_BillingInfo_tl
+ \par\vskip\baselineskip
+ }
+ }
+ \tl_if_empty:cTF {l_qrbill_data_\g__qrbill_debtorprefix_tl Name_tl} {
+ {\qrbill_headingP_font:\qrbilldebtoraddrname\par}
+ \__qrbill_placeholder:nn {65mm} {25mm}
+ }{
+ {\qrbill_headingP_font:\qrbilldebtorname\par}
+ {
+ \qrbill_valueP_font:
+ \qrbill_insert_address:N \g__qrbill_debtorprefix_tl
+ \par
+ }
+ }
+ \end{minipage}\par\nointerlineskip
+ \begin{minipage}[b][10mm][t]{\linewidth}
+ \strut
+ \qrbill_insert_AV_parameters:NNn
+ \qrbill_infoheading_font:
+ \qrbill_info_font:
+ {AV1,AV2}
+ \end{minipage}
+ \end{minipage}
+ \par\nointerlineskip\skip_vertical:n {\c_qrbill_sep_dim}
+ \smash{
+ \bool_if:NT \g__qrbill_bottom_frame_bool
+ {\rlap{\rule{\c_qrbill_width_dim}{\g__qrbill_rule_dim}}}
+ \bool_if:NTF \g__qrbill_left_frame_bool
+ {\rule{\g__qrbill_rule_dim}{\c_qrbill_height_dim}}
+ {\rule{\g__qrbill_rule_dim}{\c_zero_dim}}
+ \hspace{\dimexpr62mm-1.5\g__qrbill_rule_dim}
+ \rule{\g__qrbill_rule_dim}{\c_qrbill_height_dim}
+ \hspace{\dimexpr148mm-1.5\g__qrbill_rule_dim}
+ \bool_if:NTF \g__qrbill_right_frame_bool
+ {\rule{\g__qrbill_rule_dim}{\c_qrbill_height_dim}}
+ {\rule{\g__qrbill_rule_dim}{\c_zero_dim}}
+ }
+ }
+ }
+ \endgroup
+}
+
+\newcommand{\QRbill}[1][]{
+ \begingroup
+ \tl_if_empty:nF {#1} {\keys_set:nn {qrbill/data} {#1}}
+ \qrbill_bill_create:
+ \endgroup
+}
+
+\ior_new:N \qrbill_ior
+\clist_new:N \l_qrbill_tmpa_clist
+\ior_open:Nn \qrbill_ior {qrbill-vocab.csv}
+
+\ior_get:NN \qrbill_ior \l_tmpa_tl
+\clist_set:Nx \l_qrbill_tmpa_clist {\l_tmpa_tl}
+\int_set:Nn \l_tmpa_int {\clist_count:N \l_qrbill_tmpa_clist}
+
+\ior_str_map_inline:Nn \qrbill_ior {
+ \int_step_inline:nnn {2} {\l_tmpa_int } {
+ \exp_args:Nnx \use:n {\exp_args:NNx \exp_args:Nnc \defcaptionname
+ {\clist_item:Nn \l_qrbill_tmpa_clist {##1}}
+ {qrbill\clist_item:nn {#1} {1}name}}
+ {\clist_item:nn {#1} {##1}}
+ }
+}
+
+\ior_close:N \qrbill_ior
+
+\seq_new:N \l_qrbill_tmp_seq
+
+\cs_new:Nn \qrbill_set_address_combined:nn {
+ \seq_set_split:Nnn \l_qrbill_tmp_seq {\\} {#2}
+ \exp_args:Nnx \keys_set:nn {qrbill/data} {
+ #1AddressType=K,
+ #1Name=\seq_item:Nn \l_qrbill_tmp_seq {1},
+ #1Address1=\seq_item:Nn \l_qrbill_tmp_seq {2},
+ #1Address2=\seq_item:Nn \l_qrbill_tmp_seq {3},
+ #1PostalCode=,
+ #1City=,
+ #1Country=\seq_item:Nn \l_qrbill_tmp_seq {4},
+ }
+}
+
+\cs_new:Nn \qrbill_set_address_structured:nn {
+ \seq_set_split:Nnn \l_qrbill_tmp_seq {\\} {#2}
+ \exp_args:Nnx \keys_set:nn {qrbill/data} {
+ #1AddressType=S,
+ #1Name=\seq_item:Nn \l_qrbill_tmp_seq {1},
+ #1Address1=\seq_item:Nn \l_qrbill_tmp_seq {2},
+ #1Address2=\seq_item:Nn \l_qrbill_tmp_seq {3},
+ #1PostalCode=\seq_item:Nn \l_qrbill_tmp_seq {4},
+ #1City=\seq_item:Nn \l_qrbill_tmp_seq {5},
+ #1Country=\seq_item:Nn \l_qrbill_tmp_seq {6},
+ }
+}
+
+\cs_new:Nn \qrbill_insert_address:N {
+ \tl_use:c {l_qrbill_data_#1Name_tl}\ifhmode\\\fi
+ \str_case_e:nnF {\use:c {l_qrbill_data_#1AddressType_tl}}
+ {
+ {K} {
+ \tl_use:c {l_qrbill_data_#1Address1_tl}
+ \tl_if_empty:cF {l_qrbill_data_#1Address2_tl} {
+ \ifhmode\\\fi
+ \tl_if_empty:cF {l_qrbill_data_#1Country_tl}
+ {\tl_use:c {l_qrbill_data_#1Country_tl}-}
+ \tl_use:c {l_qrbill_data_#1Address2_tl}
+ }
+ }
+ }{
+ \tl_use:c {l_qrbill_data_#1Address1_tl}~
+ \tl_use:c {l_qrbill_data_#1Address2_tl}
+ \tl_if_empty:cF {l_qrbill_data_#1City_tl} {
+ \ifhmode\\\fi
+ \tl_if_empty:cF {l_qrbill_data_#1Country_tl}
+ {\tl_use:c {l_qrbill_data_#1Country_tl}-}
+ \tl_use:c {l_qrbill_data_#1PostalCode_tl}~
+ \tl_use:c {l_qrbill_data_#1City_tl}
+ }
+ }
+}
+
+\newcommand*{\insertdebtor}{\null\qrbill_insert_address:N \g__qrbill_debtorprefix_tl}
+\newcommand*{\insertcreditor}{\null\qrbill_insert_address:N \g__qrbill_creditorprefix_tl}
+\newcommand*{\insertcurrency}{\l_qrbill_data_Currency_tl}
+
+\keys_define:nn {qrbill/data} {
+ creditor .code:n = \qrbill_set_address_combined:nn {\g__qrbill_creditorprefix_tl}{#1},
+ creditor* .code:n = \qrbill_set_address_structured:nn {\g__qrbill_creditorprefix_tl} {#1},
+ debtor .code:n = \qrbill_set_address_combined:nn {\g__qrbill_debtorprefix_tl}{#1},
+ debtor* .code:n = \qrbill_set_address_structured:nn {\g__qrbill_debtorprefix_tl} {#1},
+ account .tl_set:N = \l_qrbill_iban_tl,
+}
+
+\clist_map_inline:nn {AV1, AV2} {
+ \keys_define:nn {qrbill/data} {
+ #1 .code:n = {
+ \tl_if_empty:nF {##1}{
+ \keys_set:nx {qrbill/data} {
+ #1-Parameters={\qrbill_av_prefix:n {#1}##1}
+ }
+ }
+ \tl_set:cn {l_qrbill_#1_tl} {##1}
+ },
+ #1 .initial:n =,
+ }
+}
+
+\newcommand*{\SetupQrBill}[1]{
+ \keys_set:nn {qrbill/data} {#1}
+}
+
+\str_new:N \l_qrbill_data_str
+\cs_new:Nn \qrcode_setup_QRcode: {
+ \str_clear:N \l_qrbill_data_str
+ \bool_set_false:N \l_tmpa_bool
+ \seq_map_inline:Nn \g__qrbill_qrscheme_seq {
+ \bool_if:NTF \l_tmpa_bool
+ {\str_put_right:Nn\l_qrbill_data_str {^^J}}
+ {\bool_set_true:N \l_tmpa_bool}
+ \exp_args:NNv \str_put_right:Nn \l_qrbill_data_str {l_qrbill_data_##1_tl}
+ }
+ %necessary to preserve spaces!
+ \str_replace_all:Nnn \l_qrbill_data_str {~ } {\ }
+ \tl_set_rescan:Nno \l_qrbill_data_str {\ExplSyntaxOff} {\l_qrbill_data_str}
+}
+
+\seq_new:N \g__qrbill_qrscheme_seq
+\newcommand*\SetQrScheme[1]{
+ \seq_gset_from_clist:Nn \g__qrbill_qrscheme_seq {#1}
+ \seq_map_inline:Nn \g__qrbill_qrscheme_seq {
+ \keys_define:nn {qrbill/data} {
+ ##1 .tl_set:c = l_qrbill_data_##1_tl,
+ ##1 .initial:n =,
+ }
+ }
+}
+
+
+
+\prop_new:N \g__qrbill_billing_info_prop
+\seq_new:N \g__qrbill_billing_info_seq
+\newcommand*{\SetBillingInfoScheme}[1]{
+ \prop_gset_from_keyval:Nn \g__qrbill_billing_info_prop {#1}
+ \seq_gclear:N \g__qrbill_billing_info_seq
+ \prop_map_inline:Nn \g__qrbill_billing_info_prop {
+ \exp_args:Nx \clist_if_in:nnF {\tl_to_str:n {prefix , postfix}} {##1} {
+ \seq_push:Nn \g__qrbill_billing_info_seq {##1}
+ }
+ \keys_define:nn {qrbill/data} {
+ ##2 .tl_set:c = l_qrbill_##2_tl,
+ ##2 .initial:n =,
+ }
+ }
+ \seq_sort:Nn \g__qrbill_billing_info_seq {
+ \int_compare:nNnTF { ##1 } > { ##2 }
+ { \sort_return_swapped: }
+ { \sort_return_same: }
+ }
+}
+
+\tl_new:N \l_qrbill_data_BillingInfo_tl
+
+\cs_new:Nn \qrbill_parse_BillingInfo: {
+ \bool_if:NT \g__grbill_billinginfo_auto_bool {
+ \str_put_right:Nx \l_qrbill_data_BillingInfo_tl {
+ \prop_item:Nn \g__qrbill_billing_info_prop {prefix}
+ }
+ \seq_map_inline:Nn \g__qrbill_billing_info_seq {
+ \prop_get:NnN \g__qrbill_billing_info_prop {##1} \l_tmpa_tl
+ \tl_if_empty:cF {l_qrbill_\l_tmpa_tl _tl} {
+ \str_put_right:Nx \l_qrbill_data_BillingInfo_tl {
+ /##1/\tl_use:c {l_qrbill_\l_tmpa_tl _tl}
+ }
+ }
+ }
+ }
+}
+
+\cs_new:Nn \qrbill_insert_AV_parameters:NNn {
+ \clist_map_inline:nn {#3} {
+ \tl_if_empty:cF {l_qrbill_##1_tl}
+ {{#1\qrbill_av_prefix:n {##1}}{#2 \tl_use:c {l_qrbill_##1_tl}}}
+ }
+}
+
+\cs_new:Nn \qrbill_av_prefix:n {Name~#1:~}
+
+\input{\g__qrbill_qrscheme_tl.qrbill-cfg}
+
+% \end{macrocode}
+% \begin{macrocode}
+%</qrbill.sty>
+%<*swiss.qrbill-cfg.tex>
+% \end{macrocode}
+% \fi
+% \begin{macrocode}
+\qrbillsetup{
+ creditorprefix =CR-,
+ debtorprefix =UD-,
+}
+
+\SetQrScheme{
+ QRType,
+ Version,
+ CodingType,
+ Account,
+ CR-AddressType,
+ CR-Name,
+ CR-Address1,
+ CR-Address2,
+ CR-PostalCode,
+ CR-City,
+ CR-Country,
+ UCR-AddressType,
+ UCR-Name,
+ UCR-Address1,
+ UCR-Address2,
+ UCR-ZIP,
+ UCR-City,
+ UCR-Country,
+ Amount,
+ Currency,
+ UD-AddressType,
+ UD-Name,
+ UD-Address1,
+ UD-Address2,
+ UD-PostalCode,
+ UD-City,
+ UD-Country,
+ ReferenceType,
+ Reference,
+ Message,
+ Trailer,
+ BillingInfo,
+ AV1-Parameters,
+ AV2-Parameters
+}
+
+\SetBillingInfoScheme{
+ prefix=//S1,
+ 10=invoicenum,
+ 11=invoicedate,
+ 20=customerref,
+ 30=vat,
+ 31=vatdate,
+ 32=vatdetails,
+ 33=importvat,
+ 40=conditions
+}
+
+\SetupQrBill{
+ QRType=SPC,
+ Version=0210,
+ CodingType=1,
+ Trailer=EPD,
+ Currency=CHF,
+ ReferenceType=NON,
+}
+% \end{macrocode}
+% \iffalse
+% \begin{macrocode}
+%</swiss.qrbill-cfg.tex>
+% \end{macrocode}
+% \fi
+%
+% \appendix
+% \section{Example of standalone qrbill}
+% \label{standalone-complete}
+% \iffalse
+% \begin{macrocode}
+%<*qrbill-standalone-demo.tex>
+% \end{macrocode}
+% \fi
+% \begin{macrocode}
+% !TeX program=lualatex
+\documentclass{standalone}
+\usepackage[nswissgerman]{babel}
+
+\RequirePackage{xcolor}
+\usepackage[icon=swiss-cross]{qrbill}
+
+\begin{document}
+
+\QRbill[
+ creditor*={foobar LLC\\
+ Postfach\\
+ 404\\
+ 2342\\
+ Zurich\\
+ CH},
+ Account=CH1280808005649899718,
+ vat=123123123,% VAT number with stripped CH and periods
+ debtor*={peiTeX\\
+ TeXnikerweg\\
+ 78\\
+ 23420\\
+ Hamburg\\
+ DE},
+ Amount=1337.42,
+ Message=Bestellung vom 27.06.2020,
+ invoicenum=100-4242,
+ invoicedate=200701,%yymmdd
+ vatdetails=0,% 0% VAT
+ vatdate=200701,%yymmdd
+ AV1=LX;F00BAR;2342,
+]
+
+\end{document}
+% \end{macrocode}
+% \iffalse
+% \begin{macrocode}
+%</qrbill-standalone-demo.tex>
+%<*qrbill-letter-demo.tex>
+% \end{macrocode}
+% \fi
+% \section{qrbill scrletter example}
+% \begin{macrocode}
+% !TeX Program=lualatex
+\documentclass[foldmarks=b]{scrletter}
+\usepackage[frame=top]{qrbill}
+
+% Setup layer
+\DeclareNewLayer[
+ align=bl,
+ voffset=\paperheight,
+ hoffset=0pt,
+ contents={\QRbill},
+ width=\paperwidth,
+ height=105mm,
+ ]{qrbill}
+
+
+
+\begin{document}
+
+\qrbillsetdata{
+ creditor*={foobar LLC\\
+ Postfach\\
+ 404\\
+ 2342\\
+ Zurich\\
+ CH},
+ Account=CH1280808005649899718,
+ vat=123123123,% VAT number with stripped CH and periods
+ debtor*={peiTeX\\
+ TeXnikerweg\\
+ 78\\
+ 23420\\
+ Hamburg\\
+ DE},
+ Amount=1337.42,
+ Message=Bestellung vom 27.06.2020,
+ invoicenum=100-4242,
+ invoicedate=200701,%yymmdd
+ vatdetails=0,% 0% VAT
+ vatdate=200701,%yymmdd
+ AV1=LX;F00BAR;2342,
+}
+
+\setkomavar{fromaddress}{\insertcreditor}
+
+\begin{letter}{\insertdebtor}
+
+\opening{opening}
+
+Text
+
+\closing{closing}
+
+% Add qbill on last page
+% For more details
+\AddLayersToPageStyle{@everystyle@}{qrbill}
+
+\end{letter}
+\end{document}
+% \end{macrocode}
+%
+% \iffalse
+% \begin{macrocode}
+%</qrbill-letter-demo.tex>
+% \end{macrocode}
+% \fi
+% \begin{thebibliography}{99}
+% \bibitem{qrbill-spec} Swiss Implementation Guidelines QR-bill: Technical and professional specifications of the payment part with Swiss QR Code and of the receipt. Version 2.1, with effect from 30 September 2019. \url{https://www.paymentstandards.ch/dam/downloads/ig-qr-bill-en.pdf}
+% \bibitem{qrbill-design} Style Guide QR-billStyle Guide QR-bill: The right layout pays off. Layout rules and recommendations for the payment part with Swiss QR Code and for the receipt. \url{https://www.paymentstandards.ch/dam/downloads/style-guide-en.pdf}
+% \end{thebibliography}
+%\Finale
+\endinput
diff --git a/macros/latex/contrib/qrbill/source/qrbill.ins b/macros/latex/contrib/qrbill/source/qrbill.ins
new file mode 100644
index 0000000000..48d4c6c8f6
--- /dev/null
+++ b/macros/latex/contrib/qrbill/source/qrbill.ins
@@ -0,0 +1,57 @@
+\input l3docstrip
+
+\def\filedate{2020/06/28}
+\def\fileversion{1.0}
+
+\preamble
+
+Copyright (C) 2020 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.3
+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.3 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, qrbill-letter-demo.tex,
+ qrbill-standalone-demo.tex .
+
+The development repository can be found at
+https://github.com/peitex/qrbill
+Please use the issue tracker for feedback!
+
+\endpreamble
+
+\askforoverwritefalse
+
+\usedir{tex/latex/qrbill}
+
+\generate{
+ \file{qrbill.sty}{
+ \from{qrbill.dtx}{qrbill.sty,package}
+ }
+ \file{swiss.qrbill-cfg.tex}{
+ \from{qrbill.dtx}{swiss.qrbill-cfg.tex}
+ }
+ \file{qrbill-letter-demo.tex}{
+ \from{qrbill.dtx}{qrbill-letter-demo.tex}
+ }
+ \file{qrbill-standalone-demo.tex}{
+ \from{qrbill.dtx}{qrbill-standalone-demo.tex}
+ }
+}
+
+\endbatchfile
diff --git a/macros/latex/contrib/qrbill/source/qrbill_swiss-cross.pdf b/macros/latex/contrib/qrbill/source/qrbill_swiss-cross.pdf
new file mode 100644
index 0000000000..0907613433
--- /dev/null
+++ b/macros/latex/contrib/qrbill/source/qrbill_swiss-cross.pdf
Binary files differ