diff options
author | Karl Berry <karl@freefriends.org> | 2021-11-10 21:17:24 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-11-10 21:17:24 +0000 |
commit | b2467f19548c05848babc60da4140140395bd0ee (patch) | |
tree | ffc8e8bc347e2326467082218e8726c17f396d7f /Master/texmf-dist/source | |
parent | eeb7ae4de7332d6c9cd5b58e81748dc9d681887b (diff) |
sdaps (10nov21)
git-svn-id: svn://tug.org/texlive/trunk@61017 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
4 files changed, 49 insertions, 31 deletions
diff --git a/Master/texmf-dist/source/latex/sdaps/sdapsarray.dtx b/Master/texmf-dist/source/latex/sdaps/sdapsarray.dtx index 59cfffa0978..b2654853c77 100644 --- a/Master/texmf-dist/source/latex/sdaps/sdapsarray.dtx +++ b/Master/texmf-dist/source/latex/sdaps/sdapsarray.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 2019 by Benjamin Berg <benjamin@sipsolutions.net> +% Copyright (C) 2019-2021 by Benjamin Berg <benjamin@sipsolutions.net> % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3c @@ -711,11 +711,11 @@ % Unfortunately checking for an empty box does not work for some reason. \dim_set:Nn \l_tmpb_dim { \box_ht:N #1 } \sdaps_if_rtl:TF { - \hcoffin_set:Nn \l_tmpb_coffin { \hbox_to_wd:nn \l_tmpa_dim { \hfil \vbox:n { \vbox_unpack_clear:N #1 } } \skip_horizontal:n { \l_sdaps_sdapsarray_colsep_dim } } + \hcoffin_set:Nn \l_tmpb_coffin { \hbox_to_wd:nn \l_tmpa_dim { \hfil \vbox:n { \vbox_unpack_drop:N #1 } } \skip_horizontal:n { \l_sdaps_sdapsarray_colsep_dim } } \tl_set:Nn \l_tmpa_tl { l } \tl_set:Nn \l_tmpb_tl { r } } { - \hcoffin_set:Nn \l_tmpb_coffin { \skip_horizontal:n { \l_sdaps_sdapsarray_colsep_dim } \hbox_to_wd:nn \l_tmpa_dim { \hfil \vbox:n { \vbox_unpack_clear:N #1 } } } + \hcoffin_set:Nn \l_tmpb_coffin { \skip_horizontal:n { \l_sdaps_sdapsarray_colsep_dim } \hbox_to_wd:nn \l_tmpa_dim { \hfil \vbox:n { \vbox_unpack_drop:N #1 } } } \tl_set:Nn \l_tmpa_tl { r } \tl_set:Nn \l_tmpb_tl { l } } diff --git a/Master/texmf-dist/source/latex/sdaps/sdapsbase.dtx b/Master/texmf-dist/source/latex/sdaps/sdapsbase.dtx index e97da6f2fc8..e993c8ba070 100644 --- a/Master/texmf-dist/source/latex/sdaps/sdapsbase.dtx +++ b/Master/texmf-dist/source/latex/sdaps/sdapsbase.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 2019 by Benjamin Berg <benjamin@sipsolutions.net> +% Copyright (C) 2019-2021 by Benjamin Berg <benjamin@sipsolutions.net> % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3c @@ -644,7 +644,7 @@ \cs_new_protected_nopar:Nn \__sdaps_questionnaire_overrides_set:nn { - \str_if_eq_x:nnTF { #1 } { * } { + \str_if_eq:eeTF { #1 } { * } { \__sdaps_parse_overrides:n{ #2 } } { \prop_put:Nnn \g__sdaps_id_to_overrides_prop { #1 } { #2 } @@ -1777,6 +1777,7 @@ \bool_gset:Nn \g__sdaps_last_page_bool \c_false_bool % TODO: We really want to make sure nobody modifies the values after \sdaps_begin: + \sdaps_info_write:x{SDAPSVersion=1.9.10} \sdaps_info_write:x{Duplex=\bool_if:NTF \g_sdaps_twoside_bool {true} {false}} \sdaps_info_write:x{PrintQuestionnaireId=\bool_if:NTF \g_sdaps_print_questionnaire_id_bool {1} {0}} \sdaps_info_write:x{ @@ -1787,6 +1788,14 @@ \sdaps_info_write:x{GlobalID=\g_sdaps_global_id_tl} \sdaps_info_write:x{GlobalIDLabel=\g_sdaps_global_id_label_tl} + \sdaps_info_write:x{ + CornerMarkMargin= + \dim_use:N\g_sdaps_edge_left_margin_dim, + \dim_use:N\g_sdaps_edge_right_margin_dim, + \dim_use:N\g_sdaps_edge_top_margin_dim, + \dim_use:N\g_sdaps_edge_bottom_margin_dim + } + \int_gset:Nn \g_sdaps_page_int { 0 } } diff --git a/Master/texmf-dist/source/latex/sdaps/sdapsclassic.dtx b/Master/texmf-dist/source/latex/sdaps/sdapsclassic.dtx index 7694aa12ee2..cfc0d877e91 100644 --- a/Master/texmf-dist/source/latex/sdaps/sdapsclassic.dtx +++ b/Master/texmf-dist/source/latex/sdaps/sdapsclassic.dtx @@ -334,7 +334,7 @@ \providecommand{\addinfo}[2]{ - \sdaps_info_write:x{\unexpanded{#1}=\unexpanded{#2}} + \sdaps_info_write:x{Info-\unexpanded{#1}=\unexpanded{#2}} } \newcommand\qid{\tl_use:N \g__sdaps_questionnaire_id_tl} @@ -925,33 +925,38 @@ you~can~get~similar~results~by~temporarily~changing~the~checkbox~style. } noinfo .meta:n = { info=false }, } -\cs_new_protected_nopar:Nn \_sdaps_classic_show_info: +\cs_new_protected_nopar:Nn \_sdaps_classic_info: { - \bool_if:NT \l__sdaps_questionnaire_info_bool { - \begin{info} - \translate{infotext} \\[1ex] - \tl_if_eq:VnTF \g_sdaps_checkmode_tl { checkcorrect } { - \begin{tabularx}{\textwidth}{lXllll} - \checkbox & \strut \translate{info-multi} & \hspace{2em} \checkedbox {} & \translate{info-cross} & \hspace{1em} \correctedbox {} & \translate{info-corrected} \\ - \checkbox* & \strut \translate{info-single} & \hspace{2em} \checkedbox* {} & \translate{info-cross} & \hspace{1em} \correctedbox* {} & \translate{info-corrected} \\ + \translate{infotext} \\[1ex] + \tl_if_eq:VnTF \g_sdaps_checkmode_tl { checkcorrect } { + \begin{tabularx}{\textwidth}{lXllll} + \checkbox & \strut \translate{info-multi} & \hspace{2em} \checkedbox {} & \translate{info-cross} & \hspace{1em} \correctedbox {} & \translate{info-corrected} \\ + \checkbox* & \strut \translate{info-single} & \hspace{2em} \checkedbox* {} & \translate{info-cross} & \hspace{1em} \correctedbox* {} & \translate{info-corrected} \\ + \end{tabularx} + } { + \tl_if_eq:VnTF \g_sdaps_checkmode_tl { check } { + \begin{tabularx}{\textwidth}{lXll} + \checkbox & \strut \translate{info-multi} & \hspace{2em} \checkedbox {} & \translate{info-cross} \\ + \checkbox* & \strut \translate{info-single} & \hspace{2em} \checkedbox* {} & \translate{info-cross} \\ + \end{tabularx} + } { + \tl_if_eq:VnTF \g_sdaps_checkmode_tl { fill } { + \begin{tabularx}{\textwidth}{lXll} + \checkbox & \strut \translate{info-multi} & \hspace{2em} \filledbox {} & \translate{info-fill} \\ + \checkbox* & \strut \translate{info-single} & \hspace{2em} \filledbox* {} & \translate{info-fill} \\ \end{tabularx} } { - \tl_if_eq:VnTF \g_sdaps_checkmode_tl { check } { - \begin{tabularx}{\textwidth}{lXll} - \checkbox & \strut \translate{info-multi} & \hspace{2em} \checkedbox {} & \translate{info-cross} \\ - \checkbox* & \strut \translate{info-single} & \hspace{2em} \checkedbox* {} & \translate{info-cross} \\ - \end{tabularx} - } { - \tl_if_eq:VnTF \g_sdaps_checkmode_tl { fill } { - \begin{tabularx}{\textwidth}{lXll} - \checkbox & \strut \translate{info-multi} & \hspace{2em} \filledbox {} & \translate{info-fill} \\ - \checkbox* & \strut \translate{info-single} & \hspace{2em} \filledbox* {} & \translate{info-fill} \\ - \end{tabularx} - } { - \PackageError{sdaps}{Sorry, there is no help text for the checkmode you have choosen right now! Please pass the noinfo optional argument to the questionnaire environment!}\@ehb % - } - } + \PackageError{sdaps}{Sorry, there is no help text for the checkmode you have choosen right now! Please pass the noinfo optional argument to the questionnaire environment!}\@ehb % } + } + } +} + +\cs_new_protected_nopar:Nn \_sdaps_classic_show_info: +{ + \bool_if:NT \l__sdaps_questionnaire_info_bool { + \begin{info} + \_sdaps_classic_info: \end{info} } \ignorespaces @@ -1059,6 +1064,10 @@ you~can~get~similar~results~by~temporarily~changing~the~checkbox~style. } \sdaps_page_end: } +\def\sdapsinfo{ + \_sdaps_classic_info: +} + % \end{macrocode} % % \subsection{The group environments} diff --git a/Master/texmf-dist/source/latex/sdaps/sdapspdf.dtx b/Master/texmf-dist/source/latex/sdaps/sdapspdf.dtx index d243a260ef9..084fffb1380 100644 --- a/Master/texmf-dist/source/latex/sdaps/sdapspdf.dtx +++ b/Master/texmf-dist/source/latex/sdaps/sdapspdf.dtx @@ -126,7 +126,7 @@ \cs_new_protected_nopar:Nn \_sdaps_pdf_overlay_checkbox_form: { - \keys_set_known:nV { sdaps / checkbox / overlay / pdfform } { \l_sdaps_parse_unknown_tl } % + \keys_set_known:nV { sdaps / checkbox / overlay / pdfform } \l_sdaps_parse_unknown_tl % \bool_if:NT \l__sdaps_pdf_form_bool { \node[anchor=center,inner~sep=0pt,outer~sep=0pt] at ($(\l_sdaps_x_dim, \l_sdaps_y_dim) + 0.5*(\l_sdaps_width_dim, -\l_sdaps_height_dim)$) { @@ -139,7 +139,7 @@ \cs_new_protected_nopar:Nn \_sdaps_pdf_overlay_text_form: { - \keys_set_known:nV { sdaps / checkbox / overlay / pdfform } { \l_sdaps_parse_unknown_tl } % + \keys_set_known:nV { sdaps / checkbox / overlay / pdfform } \l_sdaps_parse_unknown_tl % \bool_if:NT \l__sdaps_pdf_form_bool { \node[anchor=center,inner~sep=2pt,outer~sep=0pt] at ($(\l_sdaps_x_dim, \l_sdaps_y_dim) + 0.5*(\l_sdaps_width_dim, -\l_sdaps_height_dim)$) { |