summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/soup
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-04-06 21:12:54 +0000
committerKarl Berry <karl@freefriends.org>2019-04-06 21:12:54 +0000
commitfe0b87e788298b4508d2de9935559365831f8782 (patch)
treeb8d2ad5301c4f34e454dbcaa990dc0df623711de /Master/texmf-dist/tex/latex/soup
parenta214e25aa35703933434387c49111d827d19ebca (diff)
soup (6apr19)
git-svn-id: svn://tug.org/texlive/trunk@50815 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/soup')
-rw-r--r--Master/texmf-dist/tex/latex/soup/soup.sty34
1 files changed, 17 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/latex/soup/soup.sty b/Master/texmf-dist/tex/latex/soup/soup.sty
index d20a9b4618f..f545483e830 100644
--- a/Master/texmf-dist/tex/latex/soup/soup.sty
+++ b/Master/texmf-dist/tex/latex/soup/soup.sty
@@ -18,7 +18,7 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
-\ProvidesPackage{soup}[2017/01/15 v1.0 Package for word search puzzles.]
+\ProvidesPackage{soup}[2019/04/05 v1.0.2 Package for word search puzzles.]
\RequirePackage{xparse}
\RequirePackage{expl3}
\RequirePackage{l3keys2e}
@@ -77,7 +77,7 @@
\prop_new:N \g_soup_data_prop
\seq_new:N \g_soup_clue_seq
-\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
@@ -171,19 +171,21 @@
\end{tikzpicture}
}
\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 {
@@ -207,11 +209,9 @@
\int_compare:nNnTF \g_tmpa_int < \g_soup_rows_int {
\\[\l_soup_lineheight_dim]
}{
+ \\[\l_soup_lineheight_dim]\hline\end{tabular*}
}
}
- \end{tabular*}
- }
- }
}
\cs_new:Nn \__soup_show_random_symbol: {
\int_compare:nNnTF \g_soup_symbol_count_int = 0 {
@@ -350,7 +350,7 @@
\NewDocumentEnvironment{alphabetsoup}{ sO{15}oo }
{
\par\noindent
- \__soup_init:oo {#2}{#3}
+ \__soup_init:nn {#2}{#3}
\IfBooleanTF{#1}{
\def\showlist{}
}{
@@ -376,7 +376,7 @@
\NewDocumentEnvironment{Alphabetsoup}{ sO{15}oo }
{
\par\noindent
- \__soup_init:oo {#2}{#3}
+ \__soup_init:nn {#2}{#3}
\IfBooleanTF{#1}{
\def\showlist{}
}{
@@ -402,7 +402,7 @@
\NewDocumentEnvironment{homemadesoup}{ sO{15}omo }
{
\par\noindent
- \__soup_init:oo {#2}{#3}
+ \__soup_init:nn {#2}{#3}
\IfBooleanTF{#1}{
\def\showlist{}
}{
@@ -429,7 +429,7 @@
\NewDocumentEnvironment{numbersoup}{ sO{15}omO{0}o }
{
\par\noindent
- \__soup_init:oo{#2}{#3}
+ \__soup_init:nn{#2}{#3}
\IfBooleanTF{#1}{
\def\showlist{}
}{