summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/GS1
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-07-16 20:51:52 +0000
committerKarl Berry <karl@freefriends.org>2017-07-16 20:51:52 +0000
commit7530def21f1422d89c81072ef795b032eff5bb1c (patch)
treef6a0f0197eb40871834d18abc47f589ac09e0d2c /Master/texmf-dist/source/latex/GS1
parent3f6d5a9193230d67af9c184cc8cc6874456d2e7f (diff)
GS1 (16jul17)
git-svn-id: svn://tug.org/texlive/trunk@44822 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/GS1')
-rw-r--r--Master/texmf-dist/source/latex/GS1/GS1.dtx51
-rw-r--r--Master/texmf-dist/source/latex/GS1/rule-D.dtx15
2 files changed, 46 insertions, 20 deletions
diff --git a/Master/texmf-dist/source/latex/GS1/GS1.dtx b/Master/texmf-dist/source/latex/GS1/GS1.dtx
index fa8f46bb372..0f6508d9ced 100644
--- a/Master/texmf-dist/source/latex/GS1/GS1.dtx
+++ b/Master/texmf-dist/source/latex/GS1/GS1.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: GS1.dtx Copyright (C) 2012 Markus Kohm
+%% File: GS1.dtx Copyright (C) 2012-2017 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|test>
-\RequirePackage{expl3}
-\GetIdInfo$Id: GS1.dtx 15 2012-08-27 10:25:03Z mjk $
+\RequirePackage{expl3}[2017/05/29]
+\GetIdInfo$Id: GS1.dtx 22 2017-07-15 18:03:18Z mjk $
{GS1 code handler and barcode generator}
%</driver|package|test>
%<*driver>
@@ -34,7 +34,7 @@
\msg_new:nnn { GS1/test } { function }
{
Something~is~wrong~with~function~#1
- \msg_line_context:~~of~\c_job_name_tl.tex.
+ \msg_line_context:~~of~\c_sys_jobname_str.tex.
}
\ExplSyntaxOff
\begin{document}
@@ -128,6 +128,18 @@
% will be removed. All other cases result in an error message.
% \end{function}
%
+% \begin{function}{\GS_set_EAN_control_digit:N}
+% \begin{syntax}
+% "\GS_set_EAN_control_digit:N" \meta{GS1 sequence variable}
+% \end{syntax}
+% The \meta{GS1 sequence variable} should store either a EAN-8 or EAN-13
+% code with or without control digit. A new control digit will be
+% calculated. If the code has seven or twelve digits the new control digit
+% will be added. If the code has eight or 13 digits, the old control digit
+% will be replaced by the new one. All other cases result in an error
+% message.
+% \end{function}
+%
% \begin{function}{\int_set_to_EAN_control_digit:NN}
% \begin{syntax}
% "\int_set_to_EAN_control_digit:NN" \meta{integer variable} \meta{GS1 sequence variable}
@@ -315,7 +327,6 @@
% \end{macrocode}
% and what it requires:
% \begin{macrocode}
-\RequirePackage{expl3}[2012/07/16]
\RequirePackage{rule-D}
% \end{macrocode}
%
@@ -410,9 +421,9 @@
% These settings will influence the work of several of the user functions.
% They are defined as keys of family \texttt{GS1}.
%
-% \begin{macro}{ \l_GS_use_ocrb_bool, \l_GS_module_wd_dim,
+% \begin{variable}{ \l_GS_use_ocrb_bool, \l_GS_module_wd_dim,
% \l_GS_module_ht_dim, \l_GS_scale_fp, \l_GS_scale_to_font_bool,
-% \l_GS_add_control_bool, \l_GS_code_type_tl, l_GS_code_size_int }
+% \l_GS_add_control_bool, \l_GS_code_type_tl, \l_GS_code_size_int }
% \begin{macro}{\__GS_set_key_code:nn}
% 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.
@@ -449,7 +460,7 @@
add_control .initial:n = false,
}
% \end{macrocode}
-% \end{macro}
+% \end{variable}
%
% Note: Later I'll define a \LaTeXe{} command to change the defaults of those
% keys. Additionally local changes of those keys may be done using the
@@ -467,6 +478,9 @@
% \subsubsection{Messages}
% \label{seq:impl.messages}
%
+% We need a message for not supported lengths of EAN codes, because currently
+% 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}
\msg_new:nnnn { GS1 } { EAN-code-size }
{
@@ -477,7 +491,12 @@
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}
\msg_new:nnn { GS1 } { module/minwidth }
{
Resulting~module~width~is~less~than~allowed~minimum~\msg_line_context:.\\\\
@@ -556,7 +575,9 @@ Sequence~for~ISBN~978-3-86541-459-5~is:~
% \fi
% \end{macro}
%
-% \begin{macro}{\GS_cut_EAN_control_digit:N}
+% \begin{macro}[updated = 2017-07-15]{\GS_cut_EAN_control_digit:N}
+% \changes{v18}{2017/07/15}{replaced removed \cs{int_case:nnn} by
+% \cs{int_case:nnF}}^^A
% EAN code sequences with control digit are either 8 or 13 digits. To
% remove the control digit we just have to remove the right most digit from
% a 8 or 13 digits sequence. 7 or 12 digit sequences are already without
@@ -564,7 +585,7 @@ Sequence~for~ISBN~978-3-86541-459-5~is:~
% \begin{macrocode}
\cs_new_nopar:Npn \GS_cut_EAN_control_digit:N #1
{
- \int_case:nnn
+ \int_case:nnF
{ \seq_count:N #1 }
{
{ 7 } { }
@@ -707,7 +728,7 @@ Control~digit~should~be~ \tl_use:N \l_testb_tl {} ~
% \fi
% \end{macro}
%
-% \begin{macro}{\__GS_modules:Nn, \__GS_modules:NnN,
+% \begin{macro}{\__GS_modules:Nn, \__GS_modules:NnN, \__GS_modules:cn,
% \__GS_modules_start_black:Nn, \__GS_modules_start_white:Nn}
% \begin{macrocode}
\cs_new_nopar:Npn \@@_modules:Nn #1#2
@@ -1000,3 +1021,9 @@ After \verb|\GSSetup{ocrb=false,add_control}|:
\endinput
%
% end of file
+
+% \endinput
+% Local Variables:
+% mode: doctex
+% TeX-master: t
+% End:
diff --git a/Master/texmf-dist/source/latex/GS1/rule-D.dtx b/Master/texmf-dist/source/latex/GS1/rule-D.dtx
index 1912a83d62a..6397e62b3b3 100644
--- a/Master/texmf-dist/source/latex/GS1/rule-D.dtx
+++ b/Master/texmf-dist/source/latex/GS1/rule-D.dtx
@@ -17,8 +17,8 @@
%% -------------------------------------------------------------------------
%
%<*driver|package>
-\RequirePackage{expl3}
-\GetIdInfo$Id: rule-D.dtx 15 2012-08-27 10:25:03Z mjk $
+\RequirePackage{expl3}[2017/05/29]
+\GetIdInfo$Id: rule-D.dtx 22 2017-07-15 18:03:18Z mjk $
{rule functions for LaTeX3}
%</driver|package>
%<*driver>
@@ -91,11 +91,6 @@
{experimental~L3~rule~functions}
% \end{macrocode}
%
-% We need the stable kernel of L3:
-% \begin{macrocode}
-\RequirePackage{expl3}
-% \end{macrocode}
-%
% \begin{macro}{\rule:nn , \rule:nnn}
% \begin{macrocode}
\cs_new:Npn \rule:nn #1#2
@@ -104,7 +99,11 @@
}
\cs_new:Npn \rule:nnn #1#2#3
{
- \leavevmode
+% \end{macrocode}
+% 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:n
{
\tex_vrule:D width \dim_eval:n { #2 }