From 3ecc00c27119bc47ba26b518b7d26c00b69599df Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 18 Jun 2021 03:01:13 +0000 Subject: CTAN sync 202106180301 --- macros/latex/contrib/gs1/GS1.dtx | 120 ++++++++++++++------------- macros/latex/contrib/gs1/GS1.pdf | Bin 672475 -> 727465 bytes macros/latex/contrib/gs1/README.distributors | 10 --- macros/latex/contrib/gs1/rule-D.dtx | 31 ++++--- macros/latex/contrib/gs1/rule-D.pdf | Bin 396465 -> 428683 bytes 5 files changed, 82 insertions(+), 79 deletions(-) delete mode 100644 macros/latex/contrib/gs1/README.distributors (limited to 'macros/latex/contrib/gs1') diff --git a/macros/latex/contrib/gs1/GS1.dtx b/macros/latex/contrib/gs1/GS1.dtx index 0f6508d9ce..a69bbf41e8 100644 --- a/macros/latex/contrib/gs1/GS1.dtx +++ b/macros/latex/contrib/gs1/GS1.dtx @@ -18,7 +18,7 @@ % %<*driver|package|test> \RequirePackage{expl3}[2017/05/29] -\GetIdInfo$Id: GS1.dtx 22 2017-07-15 18:03:18Z mjk $ +\GetIdInfo$Id: GS1.dtx 23 2021-06-17 07:00:36Z mjk $ {GS1 code handler and barcode generator} % %<*driver> @@ -311,10 +311,10 @@ % % \section{\pkg{GS1} implementation} % \label{sec:implementation} -% \iffalse -%<*package> +% +% \begin{macrocode} %<@@=GS> -% \fi +% \end{macrocode} % % The implementation has been done in two parts. The first part is the L3 % code with all the functions and variables. The second part is the @@ -322,12 +322,14 @@ % % But before this, we just declare, what this is: % \begin{macrocode} +%<*package> \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} % \end{macrocode} % and what it requires: % \begin{macrocode} \RequirePackage{rule-D} +% % \end{macrocode} % % \subsection{Implementation of Functions and Variables} @@ -340,12 +342,14 @@ % While this is an internal function, that should allow only some tokens at % the arguments, it is declared \texttt{nopar}. % \begin{macrocode} +%<*package> \cs_new_nopar:Npn \@@_new_seq_c:cn #1#2 { \seq_new:c {c@@_ #1 _seq} \seq_set_split:Nnn \l_tmpa_seq {} {#2} \seq_gset_eq:cN {c@@_ #1 _seq} \l_tmpa_seq } +% % \end{macrocode} % \end{macro} % @@ -355,6 +359,7 @@ % These constants represent the generation rules of the left side of an EAN-13 % barcode. See figure~5.2.1.3.1-1 of the GS1 specification. % \begin{macrocode} +%<*package> \@@_new_seq_c:cn {AB0} {AAAAAA} \@@_new_seq_c:cn {AB1} {AABABB} \@@_new_seq_c:cn {AB2} {AABBAB} @@ -365,6 +370,7 @@ \@@_new_seq_c:cn {AB7} {ABABAB} \@@_new_seq_c:cn {AB8} {ABABBA} \@@_new_seq_c:cn {AB9} {ABBABA} +% % \end{macrocode} % \end{variable} % @@ -379,6 +385,7 @@ % the module sequences of type C are same like type A but start with a black % module instead of a white one. % \begin{macrocode} +%<*package> \@@_new_seq_c:cn {A0} {3211} % start white (C0 same but start with black) \@@_new_seq_c:cn {A1} {2221} \@@_new_seq_c:cn {A2} {2122} @@ -404,14 +411,17 @@ \@@_new_seq_c:cn {special} {111111} % start white \@@_new_seq_c:cn {extra_margin} {112} % start black \@@_new_seq_c:cn {extra_separator} {11} % start white +% % \end{macrocode} % \end{variable} % % There are some basic dimensions for the modules at the specification: % \begin{variable}{\c__GS_module_min_width_dim, \c__GS_module_norm_width_dim} % \begin{macrocode} +%<*package> \dim_const:Nn \c_@@_module_min_width_dim {0.264mm} \dim_const:Nn \c_@@_module_norm_width_dim {0.33mm} +% % \end{macrocode} % \end{variable} % @@ -428,6 +438,7 @@ % Needed to set both \cmd{\l_GS_code_type_tl} and \cmd{\l_GS_code_size_int} % with one key. Together they are the type of code, to be handled. % \begin{macrocode} +%<*package> \cs_new_nopar:Npn \@@_set_key_code:nn #1#2 { \tl_if_exist:NF \l_GS_code_type_tl { \tl_new:N \l_GS_code_type_tl } @@ -459,6 +470,7 @@ add_control .bool_set:N = \l_GS_add_control_bool, add_control .initial:n = false, } +% % \end{macrocode} % \end{variable} % @@ -471,7 +483,9 @@ % This will be used later for several local GS1 sequences. It is private % and also shouldn't be used in global context. % \begin{macrocode} +%<*package> \seq_new:N \l_@@_code_seq +% % \end{macrocode} % \end{variable} % @@ -482,6 +496,7 @@ % only EAN-8 and EAN-13 are supported, both with or without control % digit. This message will be used as an error message. % \begin{macrocode} +%<*package> \msg_new:nnnn { GS1 } { EAN-code-size } { #1~isn't~a~valid~EAN~code~\msg_line_context:. @@ -491,12 +506,14 @@ nor~a~EAN-13~with~or~without~control~digit.\\\\ The~GS1~module~currently~only~supports~EAN-8~and~EAN~13. } +% % \end{macrocode} % % Another message is only a warning message. It will be used whenever the used % module width would be less than the minimum module width given by the GS1 % specification. % \begin{macrocode} +%<*package> \msg_new:nnn { GS1 } { module/minwidth } { Resulting~module~width~is~less~than~allowed~minimum~\msg_line_context:.\\\\ @@ -504,6 +521,7 @@ Currently~the~module~with~would~be~#1.\\ To~avoid~problems,~I'll~increase~module~width~to~#2. } +% % \end{macrocode} % % \subsubsection{Functions} @@ -512,6 +530,7 @@ % \begin{macro}{\GS_set_code_digit_seq:Nn} % Convert a string into a code sequence ignoring all but digits. % \begin{macrocode} +%<*package> \cs_new_nopar:Npn \GS_set_code_digit_seq:Nn #1#2 { \seq_set_eq:NN #1 \c_empty_seq @@ -526,13 +545,12 @@ } } } +% % \end{macrocode} % % \TestFiles{GS_set_code_digit.tex}\UnitTested -% \iffalse meta-comment -% -%<*test&GS.set.code.digit.seq> % \begin{macrocode} +%<*test&GS.set.code.digit.seq> \ExplSyntaxOn \seq_new:N \l_testa_seq \seq_new:N \l_testb_seq @@ -569,10 +587,8 @@ Sequence~for~ISBN~978-3-86541-459-5~is:~ } \ExplSyntaxOff -% \end{macrocode} % -%<*package> -% \fi +% \end{macrocode} % \end{macro} % % \begin{macro}[updated = 2017-07-15]{\GS_cut_EAN_control_digit:N} @@ -583,6 +599,7 @@ Sequence~for~ISBN~978-3-86541-459-5~is:~ % a 8 or 13 digits sequence. 7 or 12 digit sequences are already without % control digit. All other sequences are not supported. % \begin{macrocode} +%<*package> \cs_new_nopar:Npn \GS_cut_EAN_control_digit:N #1 { \int_case:nnF @@ -597,13 +614,12 @@ Sequence~for~ISBN~978-3-86541-459-5~is:~ \msg_error:nnn { GS1 } { EAN-code-size } { #1 } } } +% % \end{macrocode} -% \TestFiles{GS_cut_EAN_control_digit.tex}\UnitTested % -% \iffalse meta-comment -% -%<*test&GS.cut.EAN.control.digit> +% \TestFiles{GS_cut_EAN_control_digit.tex}\UnitTested % \begin{macrocode} +%<*test&GS.cut.EAN.control.digit> \raggedright \ExplSyntaxOn \seq_new:N \l_testa_seq @@ -625,18 +641,17 @@ With~control:~\seq_use:Nnnn \l_testa_seq { ,~ } { ,~} { ,~ }\\ } Without~control:~\seq_use:Nnnn \l_testa_seq { ,~ } { ,~} { ,~ }\\ \ExplSyntaxOff -% \end{macrocode} % -%<*package> -% \fi +% \end{macrocode} % \end{macro} % % \begin{macro}{\int_set_to_EAN_control_digit:NN} -% Sets an integer to the control digit calculated with the EAN control digit -% algorithm for a given code sequence. Note, that the complete code -% sequence will be used to calculate the control digit. So, if you have a -% EAN-8 or EAN-13 code sequence, you should cut of the control digit first. +% Sets an integer to the control digit calculated with the EAN control digit +% algorithm for a given code sequence. Note, that the complete code +% sequence will be used to calculate the control digit. So, if you have a +% EAN-8 or EAN-13 code sequence, you should cut of the control digit first. % \begin{macrocode} +%<*package> \cs_new_nopar:Npn \int_set_to_EAN_control_digit:NN #1#2 { \int_zero:N #1 @@ -656,13 +671,12 @@ Without~control:~\seq_use:Nnnn \l_testa_seq { ,~ } { ,~} { ,~ }\\ } \int_set:Nn #1 { \int_mod:nn { 10 - \int_mod:nn { #1 } { 10 } } { 10 } } } +% % \end{macrocode} -% \TestFiles{int_set_to_EAN_control_digit.tex}\UnitTested % -% \iffalse meta-comment -% -%<*test&int.set.to.EAN.control.digit> +% \TestFiles{int_set_to_EAN_control_digit.tex}\UnitTested % \begin{macrocode} +%<*test&int.set.to.EAN.control.digit> \ExplSyntaxOn \seq_new:N \l_testa_seq \tl_new:N \l_control_tl @@ -681,28 +695,26 @@ Control~digit~should~be~\tl_use:N \l_control_tl{} ~ { \int_set_to_EAN_control_digit:NN } } \ExplSyntaxOff -% \end{macrocode} % -%<*package> -% \fi +% \end{macrocode} % \end{macro} % % \begin{macro}{\GS_set_EAN_control_digit:N} % Add a new control digit to a EAN sequence % \begin{macrocode} +%<*package> \cs_new_nopar:Npn \GS_set_EAN_control_digit:N #1 { \GS_cut_EAN_control_digit:N #1 \int_set_to_EAN_control_digit:NN \l_tmpa_int #1 \seq_put_right:NV #1 \l_tmpa_int } +% % \end{macrocode} -% \TestFiles{GS_set_EAN_control_digit.tex}\UnitTested % -% \iffalse meta-comment -% -%<*test&GS.set.EAN.control.digit> +% \TestFiles{GS_set_EAN_control_digit.tex}\UnitTested % \begin{macrocode} +%<*test&GS.set.EAN.control.digit> \ExplSyntaxOn \seq_new:N \l_testa_seq \GS_set_code_digit_seq:Nn \l_testa_seq {ISBN 978-3-86541-459-5} @@ -720,17 +732,15 @@ Control~digit~should~be~ \tl_use:N \l_testb_tl {} ~ ~but~it~\tl_use:N \t_testa_tl . \msg_error:nnn { GS1/test } { function } { \GS_set_EAN_control_digit:N } } - \ExplSyntaxOff -% \end{macrocode} % -%<*package> -% \fi +% \end{macrocode} % \end{macro} % % \begin{macro}{\__GS_modules:Nn, \__GS_modules:NnN, \__GS_modules:cn, % \__GS_modules_start_black:Nn, \__GS_modules_start_white:Nn} % \begin{macrocode} +%<*package> \cs_new_nopar:Npn \@@_modules:Nn #1#2 { \seq_map_inline:Nn #1 @@ -775,6 +785,7 @@ Control~digit~should~be~ \tl_use:N \l_testb_tl {} ~ } \cs_generate_variant:Nn \@@_modules:Nn { c } +% % \end{macrocode} % \TestFiles{EANBarcode.tex}\UnitTested % \end{macro} @@ -783,6 +794,7 @@ Control~digit~should~be~ \tl_use:N \l_testb_tl {} ~ % Puts the digits, rules, and gaps for an EAN barcode into the input % stream. % \begin{macrocode} +%<*package> \cs_new_nopar:Npn \GS_use_as_EAN_barcode:N #1 { \seq_set_eq:NN \l_@@_code_seq #1 @@ -829,6 +841,7 @@ Control~digit~should~be~ \tl_use:N \l_testb_tl {} ~ \hbox_to_wd:nn { \l_GS_module_wd_dim * 7 } { } } +% % \end{macrocode} % \TestFiles{EANBarcode.tex}\UnitTested % \end{macro} @@ -839,6 +852,7 @@ Control~digit~should~be~ \tl_use:N \l_testb_tl {} ~ % % For this, additional packages are needed: % \begin{macrocode} +%<*package> \RequirePackage{xparse} % \end{macrocode} % @@ -854,13 +868,12 @@ Control~digit~should~be~ \tl_use:N \l_testb_tl {} ~ \int_to_arabic:n { \l_tmpa_int } \group_end: } +% % \end{macrocode} % \TestFiles{EANControlDigit.tex}\UnitTested % -% \iffalse meta-comment -% -%<*test&EANControlDigit> % \begin{macrocode} +%<*test&EANControlDigit> \begin{tabular}{ll} \hline Calculated & Known \\ @@ -871,14 +884,13 @@ Control~digit~should~be~ \tl_use:N \l_testb_tl {} ~ EAN-8: 2012345\EANControlDigit{2012345} & EAN-8: 20123451 \\ \hline \end{tabular} -% \end{macrocode} % -%<*package> -% \fi +% \end{macrocode} % \end{macro} % % \begin{macro}{\EANBarcode} % \begin{macrocode} +%<*package> \NewDocumentCommand \EANBarcode { o m } { @@ -950,13 +962,12 @@ Control~digit~should~be~ \tl_use:N \l_testb_tl {} ~ \box_use:N \l_tmpa_box \group_end: } +% % \end{macrocode} % \TestFiles{EANBarcode.tex}\UnitTested % -% \iffalse meta-comment -% -%<*test&EANBarcode|GSSetup> % \begin{macrocode} +%<*test&EANBarcode|GSSetup> \raggedright \verb|\EANBarcode{ISBN 978-3-86541-459-5}|: \EANBarcode{ISBN 978-3-86541-459-5} @@ -973,24 +984,22 @@ Control~digit~should~be~ \tl_use:N \l_testb_tl {} ~ \verb|\EANBarcode[code=EAN-8,ocrb=false,add_control]{2012345}|: \EANBarcode[code=EAN-8,ocrb=false,add_control]{2012345} -% \end{macrocode} % -%<*package> -% \fi +% \end{macrocode} % \end{macro} % % \begin{macro}{\GSSetup} % \begin{macrocode} +%<*package> \NewDocumentCommand \GSSetup { m } { \keys_set:nn { GS1 } { #1 } } +% % \end{macrocode} -% \TestFiles{GSSetup.tex}\UnitTested % -% \iffalse meta-comment -% -%<*test&GSSetup> +% \TestFiles{GSSetup.tex}\UnitTested % \begin{macrocode} +%<*test&GSSetup> After \verb|\GSSetup{ocrb=false,add_control}|: \GSSetup{ocrb=false,add_control} @@ -1001,17 +1010,12 @@ After \verb|\GSSetup{ocrb=false,add_control}|: \EANBarcode[code=EAN-8,ocrb,add_control=false]{20123451} % -%<*package> -% \fi +% \end{macrocode} % \end{macro} % -% % \iffalse -% %<*test> -% \begin{macrocode} \end{document} -% \end{macrocode} % % \fi % \end{implementation} diff --git a/macros/latex/contrib/gs1/GS1.pdf b/macros/latex/contrib/gs1/GS1.pdf index 621c30aba9..9cb7557730 100644 Binary files a/macros/latex/contrib/gs1/GS1.pdf and b/macros/latex/contrib/gs1/GS1.pdf differ diff --git a/macros/latex/contrib/gs1/README.distributors b/macros/latex/contrib/gs1/README.distributors deleted file mode 100644 index a56d43dcaa..0000000000 --- a/macros/latex/contrib/gs1/README.distributors +++ /dev/null @@ -1,10 +0,0 @@ -Distributors please note: - -GS1 is an experimental package using expl3. - -Directory GS1 is a distribution of source an doc, that -may be used by CTAN for tex-archive/macros/latex/contrib/GS1. - -GS1.tds.zip is a TDS distribution of GS1. -You may use it for distributions like CTAN's -/tex-archive/install/macros/latex/contrib/GS1.tds.zip. diff --git a/macros/latex/contrib/gs1/rule-D.dtx b/macros/latex/contrib/gs1/rule-D.dtx index 6397e62b3b..98cd347dfe 100644 --- a/macros/latex/contrib/gs1/rule-D.dtx +++ b/macros/latex/contrib/gs1/rule-D.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -%% File: rule-D.dtx Copyright (C) 2012 Markus Kohm +%% File: rule-D.dtx Copyright (C) 2017-2021 Markus Kohm %% %% It may be distributed and/or modified under the conditions of the %% LaTeX Project Public License (LPPL), either version 1.3c of this @@ -17,8 +17,8 @@ %% ------------------------------------------------------------------------- % %<*driver|package> -\RequirePackage{expl3}[2017/05/29] -\GetIdInfo$Id: rule-D.dtx 22 2017-07-15 18:03:18Z mjk $ +\RequirePackage{expl3}[2019/01/17] +\GetIdInfo$Id: rule-D.dtx 23 2021-06-17 07:00:36Z mjk $ {rule functions for LaTeX3} % %<*driver> @@ -80,9 +80,10 @@ % \section{\pkg{rule-D} implementation} % \label{sec:rule-D:implementation} % -%\iffalse meta-comment +% \begin{macrocode} %<*package> -%\fi +%<@@=rule> +% \end{macrocode} % % First of all we have to setup package information: % \begin{macrocode} @@ -91,7 +92,7 @@ {experimental~L3~rule~functions} % \end{macrocode} % -% \begin{macro}{\rule:nn , \rule:nnn} +% \begin{macro}[updated = 2021-06-17]{\rule:nn , \rule:nnn} % \begin{macrocode} \cs_new:Npn \rule:nn #1#2 { @@ -100,10 +101,12 @@ \cs_new:Npn \rule:nnn #1#2#3 { % \end{macrocode} -% Following line is same like \cs{leavevmode}, but it's \LaTeX3 instead of -% plain\TeX. +% \changes{v23}{2021/06/17}{deprecated \cs{hbox_unpack_clear} replaced by +% \cs{hbox_unpack_drop}} +% Following line is same like \cs{leavevmode}, but it's \LaTeX3 instead of +% plain\TeX. % \begin{macrocode} - \hbox_unpack_clear:N \c_empty_box + \hbox_unpack_drop:N \c_empty_box \hbox:n { \tex_vrule:D width \dim_eval:n { #2 } @@ -114,9 +117,9 @@ % \end{macrocode} % \end{macro} % -%\iffalse meta-comment +% \begin{macrocode} % -%\fi +% \end{macrocode} % % \end{implementation} % @@ -125,3 +128,9 @@ \endinput % % end of file + +% \endinput +% Local Variables: +% mode: doctex +% TeX-master: t +% End: diff --git a/macros/latex/contrib/gs1/rule-D.pdf b/macros/latex/contrib/gs1/rule-D.pdf index ac07a34437..d228b0148d 100644 Binary files a/macros/latex/contrib/gs1/rule-D.pdf and b/macros/latex/contrib/gs1/rule-D.pdf differ -- cgit v1.2.3