From bb64113f0c117e1f3236a66b9f963b9bca4955e0 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 27 Aug 2012 22:12:41 +0000 Subject: GS1 (27aug12) git-svn-id: svn://tug.org/texlive/trunk@27540 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/GS1/GS1.pdf | Bin 667918 -> 668222 bytes .../doc/latex/GS1/examples/EANBarcode.pdf | Bin 36908 -> 36908 bytes .../doc/latex/GS1/examples/EANBarcode.tex | 4 +- .../doc/latex/GS1/examples/EANControlDigit.pdf | Bin 16150 -> 16150 bytes .../doc/latex/GS1/examples/EANControlDigit.tex | 4 +- .../texmf-dist/doc/latex/GS1/examples/GSSetup.pdf | Bin 39230 -> 39230 bytes .../texmf-dist/doc/latex/GS1/examples/GSSetup.tex | 4 +- .../GS1/examples/GS_cut_EAN_control_digit.pdf | Bin 14001 -> 14001 bytes .../GS1/examples/GS_cut_EAN_control_digit.tex | 4 +- .../GS1/examples/GS_set_EAN_control_digit.pdf | Bin 13669 -> 13669 bytes .../GS1/examples/GS_set_EAN_control_digit.tex | 4 +- .../latex/GS1/examples/GS_set_code_digit_seq.pdf | Bin 14928 -> 14928 bytes .../latex/GS1/examples/GS_set_code_digit_seq.tex | 4 +- .../GS1/examples/int_set_to_EAN_control_digit.pdf | Bin 13669 -> 13669 bytes .../GS1/examples/int_set_to_EAN_control_digit.tex | 4 +- Master/texmf-dist/doc/latex/GS1/rule-D.pdf | Bin 397734 -> 396835 bytes Master/texmf-dist/source/latex/GS1/GS1.dtx | 53 ++++++++++++++++----- Master/texmf-dist/source/latex/GS1/rule-D.dtx | 4 +- Master/texmf-dist/tex/latex/GS1/GS1.sty | 43 +++++++++++++++-- Master/texmf-dist/tex/latex/GS1/rule-D.sty | 4 +- Master/tlpkg/libexec/ctan2tds | 1 + 21 files changed, 99 insertions(+), 34 deletions(-) diff --git a/Master/texmf-dist/doc/latex/GS1/GS1.pdf b/Master/texmf-dist/doc/latex/GS1/GS1.pdf index 4791b71aa43..04d8c44e9a1 100644 Binary files a/Master/texmf-dist/doc/latex/GS1/GS1.pdf and b/Master/texmf-dist/doc/latex/GS1/GS1.pdf differ diff --git a/Master/texmf-dist/doc/latex/GS1/examples/EANBarcode.pdf b/Master/texmf-dist/doc/latex/GS1/examples/EANBarcode.pdf index aefe9f33213..70ef544edc3 100644 Binary files a/Master/texmf-dist/doc/latex/GS1/examples/EANBarcode.pdf and b/Master/texmf-dist/doc/latex/GS1/examples/EANBarcode.pdf differ diff --git a/Master/texmf-dist/doc/latex/GS1/examples/EANBarcode.tex b/Master/texmf-dist/doc/latex/GS1/examples/EANBarcode.tex index 01214df1169..dcf0a17c765 100644 --- a/Master/texmf-dist/doc/latex/GS1/examples/EANBarcode.tex +++ b/Master/texmf-dist/doc/latex/GS1/examples/EANBarcode.tex @@ -31,8 +31,8 @@ %% The released version of this bundle is available from CTAN. %% %% ------------------------------------------------------------------------- -\RequirePackage{l3names} -\GetIdInfo$Id: GS1.dtx 9 2012-08-01 09:31:32Z mjk $ +\RequirePackage{expl3} +\GetIdInfo$Id: GS1.dtx 15 2012-08-27 10:25:03Z mjk $ {GS1 code handler and barcode generator} \documentclass{article} \usepackage{GS1} diff --git a/Master/texmf-dist/doc/latex/GS1/examples/EANControlDigit.pdf b/Master/texmf-dist/doc/latex/GS1/examples/EANControlDigit.pdf index 863873aca3d..3386ab9973c 100644 Binary files a/Master/texmf-dist/doc/latex/GS1/examples/EANControlDigit.pdf and b/Master/texmf-dist/doc/latex/GS1/examples/EANControlDigit.pdf differ diff --git a/Master/texmf-dist/doc/latex/GS1/examples/EANControlDigit.tex b/Master/texmf-dist/doc/latex/GS1/examples/EANControlDigit.tex index f30e234d3e3..23ebcdbfc35 100644 --- a/Master/texmf-dist/doc/latex/GS1/examples/EANControlDigit.tex +++ b/Master/texmf-dist/doc/latex/GS1/examples/EANControlDigit.tex @@ -31,8 +31,8 @@ %% The released version of this bundle is available from CTAN. %% %% ------------------------------------------------------------------------- -\RequirePackage{l3names} -\GetIdInfo$Id: GS1.dtx 9 2012-08-01 09:31:32Z mjk $ +\RequirePackage{expl3} +\GetIdInfo$Id: GS1.dtx 15 2012-08-27 10:25:03Z mjk $ {GS1 code handler and barcode generator} \documentclass{article} \usepackage{GS1} diff --git a/Master/texmf-dist/doc/latex/GS1/examples/GSSetup.pdf b/Master/texmf-dist/doc/latex/GS1/examples/GSSetup.pdf index c89f544f732..0c7d85a7c00 100644 Binary files a/Master/texmf-dist/doc/latex/GS1/examples/GSSetup.pdf and b/Master/texmf-dist/doc/latex/GS1/examples/GSSetup.pdf differ diff --git a/Master/texmf-dist/doc/latex/GS1/examples/GSSetup.tex b/Master/texmf-dist/doc/latex/GS1/examples/GSSetup.tex index f6962e5ce22..137fcb418b9 100644 --- a/Master/texmf-dist/doc/latex/GS1/examples/GSSetup.tex +++ b/Master/texmf-dist/doc/latex/GS1/examples/GSSetup.tex @@ -31,8 +31,8 @@ %% The released version of this bundle is available from CTAN. %% %% ------------------------------------------------------------------------- -\RequirePackage{l3names} -\GetIdInfo$Id: GS1.dtx 9 2012-08-01 09:31:32Z mjk $ +\RequirePackage{expl3} +\GetIdInfo$Id: GS1.dtx 15 2012-08-27 10:25:03Z mjk $ {GS1 code handler and barcode generator} \documentclass{article} \usepackage{GS1} diff --git a/Master/texmf-dist/doc/latex/GS1/examples/GS_cut_EAN_control_digit.pdf b/Master/texmf-dist/doc/latex/GS1/examples/GS_cut_EAN_control_digit.pdf index 6c7c28c29b3..2b5dfc1f4a5 100644 Binary files a/Master/texmf-dist/doc/latex/GS1/examples/GS_cut_EAN_control_digit.pdf and b/Master/texmf-dist/doc/latex/GS1/examples/GS_cut_EAN_control_digit.pdf differ diff --git a/Master/texmf-dist/doc/latex/GS1/examples/GS_cut_EAN_control_digit.tex b/Master/texmf-dist/doc/latex/GS1/examples/GS_cut_EAN_control_digit.tex index a1e974c235a..2011d6dd63e 100644 --- a/Master/texmf-dist/doc/latex/GS1/examples/GS_cut_EAN_control_digit.tex +++ b/Master/texmf-dist/doc/latex/GS1/examples/GS_cut_EAN_control_digit.tex @@ -31,8 +31,8 @@ %% The released version of this bundle is available from CTAN. %% %% ------------------------------------------------------------------------- -\RequirePackage{l3names} -\GetIdInfo$Id: GS1.dtx 9 2012-08-01 09:31:32Z mjk $ +\RequirePackage{expl3} +\GetIdInfo$Id: GS1.dtx 15 2012-08-27 10:25:03Z mjk $ {GS1 code handler and barcode generator} \documentclass{article} \usepackage{GS1} diff --git a/Master/texmf-dist/doc/latex/GS1/examples/GS_set_EAN_control_digit.pdf b/Master/texmf-dist/doc/latex/GS1/examples/GS_set_EAN_control_digit.pdf index 5e48e86db89..2ae785a18b4 100644 Binary files a/Master/texmf-dist/doc/latex/GS1/examples/GS_set_EAN_control_digit.pdf and b/Master/texmf-dist/doc/latex/GS1/examples/GS_set_EAN_control_digit.pdf differ diff --git a/Master/texmf-dist/doc/latex/GS1/examples/GS_set_EAN_control_digit.tex b/Master/texmf-dist/doc/latex/GS1/examples/GS_set_EAN_control_digit.tex index 70cd849f52e..239cbf8fe27 100644 --- a/Master/texmf-dist/doc/latex/GS1/examples/GS_set_EAN_control_digit.tex +++ b/Master/texmf-dist/doc/latex/GS1/examples/GS_set_EAN_control_digit.tex @@ -31,8 +31,8 @@ %% The released version of this bundle is available from CTAN. %% %% ------------------------------------------------------------------------- -\RequirePackage{l3names} -\GetIdInfo$Id: GS1.dtx 9 2012-08-01 09:31:32Z mjk $ +\RequirePackage{expl3} +\GetIdInfo$Id: GS1.dtx 15 2012-08-27 10:25:03Z mjk $ {GS1 code handler and barcode generator} \documentclass{article} \usepackage{GS1} diff --git a/Master/texmf-dist/doc/latex/GS1/examples/GS_set_code_digit_seq.pdf b/Master/texmf-dist/doc/latex/GS1/examples/GS_set_code_digit_seq.pdf index 549839dce25..147dbc2b747 100644 Binary files a/Master/texmf-dist/doc/latex/GS1/examples/GS_set_code_digit_seq.pdf and b/Master/texmf-dist/doc/latex/GS1/examples/GS_set_code_digit_seq.pdf differ diff --git a/Master/texmf-dist/doc/latex/GS1/examples/GS_set_code_digit_seq.tex b/Master/texmf-dist/doc/latex/GS1/examples/GS_set_code_digit_seq.tex index 575bb176c0a..ef2ec56eaa4 100644 --- a/Master/texmf-dist/doc/latex/GS1/examples/GS_set_code_digit_seq.tex +++ b/Master/texmf-dist/doc/latex/GS1/examples/GS_set_code_digit_seq.tex @@ -31,8 +31,8 @@ %% The released version of this bundle is available from CTAN. %% %% ------------------------------------------------------------------------- -\RequirePackage{l3names} -\GetIdInfo$Id: GS1.dtx 9 2012-08-01 09:31:32Z mjk $ +\RequirePackage{expl3} +\GetIdInfo$Id: GS1.dtx 15 2012-08-27 10:25:03Z mjk $ {GS1 code handler and barcode generator} \documentclass{article} \usepackage{GS1} diff --git a/Master/texmf-dist/doc/latex/GS1/examples/int_set_to_EAN_control_digit.pdf b/Master/texmf-dist/doc/latex/GS1/examples/int_set_to_EAN_control_digit.pdf index edcb1cc3974..3a4a00eb838 100644 Binary files a/Master/texmf-dist/doc/latex/GS1/examples/int_set_to_EAN_control_digit.pdf and b/Master/texmf-dist/doc/latex/GS1/examples/int_set_to_EAN_control_digit.pdf differ diff --git a/Master/texmf-dist/doc/latex/GS1/examples/int_set_to_EAN_control_digit.tex b/Master/texmf-dist/doc/latex/GS1/examples/int_set_to_EAN_control_digit.tex index e9e00c1f221..520cbcbc7bf 100644 --- a/Master/texmf-dist/doc/latex/GS1/examples/int_set_to_EAN_control_digit.tex +++ b/Master/texmf-dist/doc/latex/GS1/examples/int_set_to_EAN_control_digit.tex @@ -31,8 +31,8 @@ %% The released version of this bundle is available from CTAN. %% %% ------------------------------------------------------------------------- -\RequirePackage{l3names} -\GetIdInfo$Id: GS1.dtx 9 2012-08-01 09:31:32Z mjk $ +\RequirePackage{expl3} +\GetIdInfo$Id: GS1.dtx 15 2012-08-27 10:25:03Z mjk $ {GS1 code handler and barcode generator} \documentclass{article} \usepackage{GS1} diff --git a/Master/texmf-dist/doc/latex/GS1/rule-D.pdf b/Master/texmf-dist/doc/latex/GS1/rule-D.pdf index 31c36c857ac..bea35bc71f1 100644 Binary files a/Master/texmf-dist/doc/latex/GS1/rule-D.pdf and b/Master/texmf-dist/doc/latex/GS1/rule-D.pdf differ diff --git a/Master/texmf-dist/source/latex/GS1/GS1.dtx b/Master/texmf-dist/source/latex/GS1/GS1.dtx index 2db8a55ece2..fa8f46bb372 100644 --- a/Master/texmf-dist/source/latex/GS1/GS1.dtx +++ b/Master/texmf-dist/source/latex/GS1/GS1.dtx @@ -17,8 +17,8 @@ %% ------------------------------------------------------------------------- % %<*driver|package|test> -\RequirePackage{l3names} -\GetIdInfo$Id: GS1.dtx 9 2012-08-01 09:31:32Z mjk $ +\RequirePackage{expl3} +\GetIdInfo$Id: GS1.dtx 15 2012-08-27 10:25:03Z mjk $ {GS1 code handler and barcode generator} % %<*driver> @@ -219,8 +219,10 @@ % from 0.8 up to 2.0 with steps of 0.05. Factors less than 0.8 % shouldn't be used. \emph{Currently \texttt{scale} won't be used!} % \item[\texttt{scale\_to\_font=}\meta{boolean}]\hfill\\ -% Ignore \texttt{scale} and calculate your own scale by the width of -% digit 0 of the current font. \emph{See note to \texttt{scale} above!} +% Ignore \texttt{module_width} and instead set the module width +% depending on the width of digit 0 of the current font. Note, that +% this will not scale the whole bar code but only the module width. To +% scale the whole bar code, you should use \texttt{scale}. % \item[\texttt{add\_control=}\meta{boolean}]\hfill\\ % Add the control digit to the GS1 code. If there's already a control % digit, replace it by the calculated one. The predefined default is @@ -396,7 +398,6 @@ % % 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} -% \cmd{\c@@_module_min_width_dim} Currently not used. % \begin{macrocode} \dim_const:Nn \c_@@_module_min_width_dim {0.264mm} \dim_const:Nn \c_@@_module_norm_width_dim {0.33mm} @@ -476,6 +477,14 @@ nor~a~EAN-13~with~or~without~control~digit.\\\\ The~GS1~module~currently~only~supports~EAN-8~and~EAN~13. } + +\msg_new:nnn { GS1 } { module/minwidth } + { + Resulting~module~width~is~less~than~allowed~minimum~\msg_line_context:.\\\\ + GS1~specification~declares~a~minimum~module~width~of~#2.\\ + Currently~the~module~with~would~be~#1.\\ + To~avoid~problems,~I'll~increase~module~width~to~#2. + } % \end{macrocode} % % \subsubsection{Functions} @@ -757,8 +766,6 @@ Control~digit~should~be~ \tl_use:N \l_testb_tl {} ~ { \seq_set_eq:NN \l_@@_code_seq #1 - \leavevmode - \int_compare:nNnTF { \l_GS_code_size_int } { = } { 8 } { \hbox_to_wd:nn { \l_GS_module_wd_dim * 7 } { } @@ -892,10 +899,34 @@ Control~digit~should~be~ \tl_use:N \l_testb_tl {} ~ \seq_put_left:Nn \l_@@_code_seq { 0 } } -% \end{macrocode} -% \textsc{ToDo:} Use options \texttt{scale} and \texttt{scale_to_font}. -% \begin{macrocode} - \GS_use_as_EAN_barcode:N \l_@@_code_seq + \bool_if:NT \l_GS_scale_to_font_bool { + \hbox_set:Nn \l_tmpa_box { 0 } + \dim_set:Nn \l_GS_module_wd_dim { \box_wd:N \l_tmpa_box / 7 } + } + + \dim_set:Nn \l_tmpa_dim + { \fp_to_decimal:N \l_GS_scale_fp \l_GS_module_wd_dim } + + \dim_compare:nNnT + { \l_tmpa_dim } + { < } + { \c_@@_module_min_width_dim } + { + \msg_warning:nnxx { GS1 } { module/minwidth } + { \dim_use:N \l_GS_module_wd_dim } + { \dim_use:N \c_@@_module_min_width_dim } + \dim_set:Nn \l_GS_module_wd_dim + { + \c_@@_module_min_width_dim * + 100 / \fp_to_int:n { 100 * \l_GS_scale_fp } + } + } + + \hbox_set:Nn \l_tmpa_box { \GS_use_as_EAN_barcode:N \l_@@_code_seq } + \box_scale:Nnn \l_tmpa_box + { \fp_to_int:n { 100 * \l_GS_scale_fp } / 100 } + { \fp_to_int:n { 100 * \l_GS_scale_fp } / 100 } + \box_use:N \l_tmpa_box \group_end: } % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/GS1/rule-D.dtx b/Master/texmf-dist/source/latex/GS1/rule-D.dtx index 817583b77f8..1912a83d62a 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{l3names} -\GetIdInfo$Id: rule-D.dtx 3 2012-07-27 10:33:18Z mjk $ +\RequirePackage{expl3} +\GetIdInfo$Id: rule-D.dtx 15 2012-08-27 10:25:03Z mjk $ {rule functions for LaTeX3} % %<*driver> diff --git a/Master/texmf-dist/tex/latex/GS1/GS1.sty b/Master/texmf-dist/tex/latex/GS1/GS1.sty index e7cfb071b29..7c97bf56eee 100644 --- a/Master/texmf-dist/tex/latex/GS1/GS1.sty +++ b/Master/texmf-dist/tex/latex/GS1/GS1.sty @@ -31,8 +31,8 @@ %% The released version of this bundle is available from CTAN. %% %% ------------------------------------------------------------------------- -\RequirePackage{l3names} -\GetIdInfo$Id: GS1.dtx 9 2012-08-01 09:31:32Z mjk $ +\RequirePackage{expl3} +\GetIdInfo$Id: GS1.dtx 15 2012-08-27 10:25:03Z mjk $ {GS1 code handler and barcode generator} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -119,6 +119,14 @@ nor~a~EAN-13~with~or~without~control~digit.\\\\ The~GS1~module~currently~only~supports~EAN-8~and~EAN~13. } + +\msg_new:nnn { GS1 } { module/minwidth } + { + Resulting~module~width~is~less~than~allowed~minimum~\msg_line_context:.\\\\ + GS1~specification~declares~a~minimum~module~width~of~#2.\\ + Currently~the~module~with~would~be~#1.\\ + To~avoid~problems,~I'll~increase~module~width~to~#2. + } \cs_new_nopar:Npn \GS_set_code_digit_seq:Nn #1#2 { \seq_set_eq:NN #1 \c_empty_seq @@ -220,8 +228,6 @@ { \seq_set_eq:NN \l__GS_code_seq #1 - \leavevmode - \int_compare:nNnTF { \l_GS_code_size_int } { = } { 8 } { \hbox_to_wd:nn { \l_GS_module_wd_dim * 7 } { } @@ -313,7 +319,34 @@ \seq_put_left:Nn \l__GS_code_seq { 0 } } - \GS_use_as_EAN_barcode:N \l__GS_code_seq + \bool_if:NT \l_GS_scale_to_font_bool { + \hbox_set:Nn \l_tmpa_box { 0 } + \dim_set:Nn \l_GS_module_wd_dim { \box_wd:N \l_tmpa_box / 7 } + } + + \dim_set:Nn \l_tmpa_dim + { \fp_to_decimal:N \l_GS_scale_fp \l_GS_module_wd_dim } + + \dim_compare:nNnT + { \l_tmpa_dim } + { < } + { \c__GS_module_min_width_dim } + { + \msg_warning:nnxx { GS1 } { module/minwidth } + { \dim_use:N \l_GS_module_wd_dim } + { \dim_use:N \c__GS_module_min_width_dim } + \dim_set:Nn \l_GS_module_wd_dim + { + \c__GS_module_min_width_dim * + 100 / \fp_to_int:n { 100 * \l_GS_scale_fp } + } + } + + \hbox_set:Nn \l_tmpa_box { \GS_use_as_EAN_barcode:N \l__GS_code_seq } + \box_scale:Nnn \l_tmpa_box + { \fp_to_int:n { 100 * \l_GS_scale_fp } / 100 } + { \fp_to_int:n { 100 * \l_GS_scale_fp } / 100 } + \box_use:N \l_tmpa_box \group_end: } \NewDocumentCommand \GSSetup diff --git a/Master/texmf-dist/tex/latex/GS1/rule-D.sty b/Master/texmf-dist/tex/latex/GS1/rule-D.sty index 73bc9c902a1..ff5e3f8a5fc 100644 --- a/Master/texmf-dist/tex/latex/GS1/rule-D.sty +++ b/Master/texmf-dist/tex/latex/GS1/rule-D.sty @@ -31,8 +31,8 @@ %% The released version of this bundle is available from CTAN. %% %% ------------------------------------------------------------------------- -\RequirePackage{l3names} -\GetIdInfo$Id: rule-D.dtx 3 2012-07-27 10:33:18Z mjk $ +\RequirePackage{expl3} +\GetIdInfo$Id: rule-D.dtx 15 2012-08-27 10:25:03Z mjk $ {rule functions for LaTeX3} \ProvidesExplPackage {rule-D} {\ExplFileDate} {\ExplFileVersion} diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index b53780f1a6f..b6ccdb66705 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -436,6 +436,7 @@ chomp ($Build = `cd $Master/../Build/source && pwd`); 'graphicxsp', "die 'skipping, requires adobe distiller'", 'grnumalt', "die 'skipping, nonfree'", 'grtimes', "die 'skipping, requires nonfree monotype times'", + 'gs1', "die 'skipping, use GS1'", 'guitbeamer', "die 'skipping, nonfree'", 'ha-prosper', "die 'skipping, use HA-prosper'", 'harvardkyoto',"die 'skipping, use xetex-devanagari'", -- cgit v1.2.3