From fe0b87e788298b4508d2de9935559365831f8782 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sat, 6 Apr 2019 21:12:54 +0000
Subject: soup (6apr19)

git-svn-id: svn://tug.org/texlive/trunk@50815 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/source/latex/soup/soup.dtx | 37 ++++++++++++++--------------
 1 file changed, 19 insertions(+), 18 deletions(-)

(limited to 'Master/texmf-dist/source/latex/soup/soup.dtx')

diff --git a/Master/texmf-dist/source/latex/soup/soup.dtx b/Master/texmf-dist/source/latex/soup/soup.dtx
index 5af15c6edce..aa7dc053371 100644
--- a/Master/texmf-dist/source/latex/soup/soup.dtx
+++ b/Master/texmf-dist/source/latex/soup/soup.dtx
@@ -16,7 +16,7 @@
 %
 % \iffalse
 %<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
-%<package>\ProvidesPackage{soup}[2017/01/15 v1.0 Package for word search puzzles.]
+%<package>\ProvidesPackage{soup}[2019/04/05 v1.0.2 Package for word search puzzles.]
 %
 %<*driver>
 \documentclass[full]{l3doc}
@@ -30,6 +30,7 @@
 %</driver>
 % \fi
 % \changes{v1.0}{2017/01/10}{Initial version}
+% \changes{v1.0.2}{2019/04/05}{Update to work with changes to expl3 kernel.}
 % \GetFileInfo{soup.sty}
 %
 % \DoNotIndex{\#,\$,\%,\&,\@,\\,\{,\},\^,\_,\~,\ }
@@ -373,10 +374,10 @@
 % \subsection{Internal Functions}
 %
 %
-% \begin{macro}[aux]{\__soup_init:oo}
+% \begin{macro}[aux]{\__soup_init:nn}
 % Resets the storage in preparation for a new soup.
 %    \begin{macrocode}
-\cs_new:Nn \__soup_init:oo {
+\cs_new:Nn \__soup_init:nn {
     \clist_clear_new:N \g_soup_symbol_clist
     \dim_gzero_new:N \g_soup_highlight_dim
     \dim_gzero_new:N \g_soup_spacing_dim
@@ -516,19 +517,21 @@
 %
 %    \begin{macrocode}
 \cs_new:Nn \__soup_draw_soup_tabular: {
+    \dim_zero_new:N \l_soup_colwidth_dim
+    \exp_args:Nnx
+    \dim_set:Nn \l_soup_colwidth_dim {\fp_to_dim:n {0.45 * \textwidth / (\g_soup_columns_int + 1)}}
+
     \dim_zero_new:N \l_soup_lineheight_dim
-    \dim_set:Nn \l_soup_lineheight_dim {\g_soup_spacing_dim - \baselineskip}
+    \dim_set:Nn \l_soup_lineheight_dim {2\l_soup_colwidth_dim - \baselineskip}
 
+    \setlength{\tabcolsep}{\l_soup_colwidth_dim}
     \vspace{0.25\g_soup_spacing_dim}\par
-    \noindent\fbox{\parbox[c][
-        \g_soup_rows_int\g_soup_spacing_dim
-    ][c]{\g_soup_columns_int\g_soup_spacing_dim}{
-    \begin{tabular*}{
-        \g_soup_columns_int\g_soup_spacing_dim
-    }{
+    \noindent
+    \begin{tabular*}{\textwidth}{
         @{\extracolsep{\fill}}
-        *{\g_soup_columns_int}{c}
+        | *{\g_soup_columns_int}{c@{\hskip\l_soup_colwidth_dim}} |
     }
+        \hline\rule{0pt}{\g_soup_spacing_dim}
         \int_step_inline:nnnn {1} {1} {\g_soup_rows_int } {
             \int_gset:Nn \g_tmpa_int {##1}
             \int_step_variable:nnnNn {1} {1} {\g_soup_columns_int} \l_tmpb_int {
@@ -552,11 +555,9 @@
             \int_compare:nNnTF \g_tmpa_int < \g_soup_rows_int {
                 \\[\l_soup_lineheight_dim]
             }{
+                \\[\l_soup_lineheight_dim]\hline\end{tabular*}
             }
         }
-    \end{tabular*}
-    }
-    }
 }
 %    \end{macrocode}
 % \end{macro}
@@ -756,7 +757,7 @@
 \NewDocumentEnvironment{alphabetsoup}{ sO{15}oo }
 {
     \par\noindent
-    \__soup_init:oo {#2}{#3}
+    \__soup_init:nn {#2}{#3}
     \IfBooleanTF{#1}{
         \def\showlist{}
     }{
@@ -792,7 +793,7 @@
 \NewDocumentEnvironment{Alphabetsoup}{ sO{15}oo }
 {
     \par\noindent
-    \__soup_init:oo {#2}{#3}
+    \__soup_init:nn {#2}{#3}
     \IfBooleanTF{#1}{
         \def\showlist{}
     }{
@@ -826,7 +827,7 @@
 \NewDocumentEnvironment{homemadesoup}{ sO{15}omo }
 {
     \par\noindent
-    \__soup_init:oo {#2}{#3}
+    \__soup_init:nn {#2}{#3}
     \IfBooleanTF{#1}{
         \def\showlist{}
     }{
@@ -860,7 +861,7 @@
 \NewDocumentEnvironment{numbersoup}{ sO{15}omO{0}o }
 {
     \par\noindent
-    \__soup_init:oo{#2}{#3}
+    \__soup_init:nn{#2}{#3}
     \IfBooleanTF{#1}{
         \def\showlist{}
     }{
-- 
cgit v1.2.3

