diff options
author | Karl Berry <karl@freefriends.org> | 2022-08-23 20:22:42 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-08-23 20:22:42 +0000 |
commit | 773e4f73523a344ef29afc18e834bdfcaa145201 (patch) | |
tree | 28bab692f3a1e1091df1869c76fd13ec4e66bc52 | |
parent | 7a56dfacda86e4e827037995a1bf905b9713c935 (diff) |
pseudo (23aug22)
git-svn-id: svn://tug.org/texlive/trunk@64179 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/pseudo/VERSION | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/pseudo/doc/pseudo.pdf | bin | 949345 -> 950360 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/pseudo/doc/pseudo.tex | 43 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/pseudo/test/overlaytest.tex | 12 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/pseudo/pseudo.sty | 33 |
5 files changed, 70 insertions, 20 deletions
diff --git a/Master/texmf-dist/doc/latex/pseudo/VERSION b/Master/texmf-dist/doc/latex/pseudo/VERSION index 5625e59da88..6085e946503 100644 --- a/Master/texmf-dist/doc/latex/pseudo/VERSION +++ b/Master/texmf-dist/doc/latex/pseudo/VERSION @@ -1 +1 @@ -1.2 +1.2.1 diff --git a/Master/texmf-dist/doc/latex/pseudo/doc/pseudo.pdf b/Master/texmf-dist/doc/latex/pseudo/doc/pseudo.pdf Binary files differindex a33aa551c25..920266e1186 100644 --- a/Master/texmf-dist/doc/latex/pseudo/doc/pseudo.pdf +++ b/Master/texmf-dist/doc/latex/pseudo/doc/pseudo.pdf diff --git a/Master/texmf-dist/doc/latex/pseudo/doc/pseudo.tex b/Master/texmf-dist/doc/latex/pseudo/doc/pseudo.tex index c5fc55456f6..21e640267c7 100644 --- a/Master/texmf-dist/doc/latex/pseudo/doc/pseudo.tex +++ b/Master/texmf-dist/doc/latex/pseudo/doc/pseudo.tex @@ -3806,9 +3806,10 @@ variants we'll need of some standard commands. (I'm using the \verb|\q_no_value| machinery rather than \verb|\c_novalue_tl| for compatibility with older \TeX\ distributions.) \begin{source} -\cs_generate_variant:Nn \quark_if_no_value:nTF { VTF } -\cs_generate_variant:Nn \tl_if_novalue:nTF { VTF } -\cs_generate_variant:Nn \tl_set:Nn { Ne } +\cs_generate_variant:Nn \quark_if_no_value:nTF { VTF } +\cs_generate_variant:Nn \tl_if_novalue:nTF { VTF } +\cs_generate_variant:Nn \tl_set:Nn { Ne } +\exp_args_generate:n { NNVNNV } \end{source} \paragraph{Defining columns.} The \refk{preamble} is is configurable, but the \pkg{array} package makes sure it doesn't expand any part of its preamble. One @@ -4591,10 +4592,12 @@ latter of the two really shouldn't.\footnote{See \begin{source} \cs_new:Npn \@@_keys_set_overlay:nnn #1 #2 #3 { \bool_if:NT \c_@@_beamer_bool { - \only<#1>{ \keys_set:nn { #2 } { #3 } } + \tl_if_novalue:nF { #1 } { + \only<#1>{ \keys_set:nn { #2 } { #3 } } + } } } -\cs_generate_variant:Nn \@@_keys_set_overlay:nnn { VnV } + \msg_new:nnn { pseudo } { unknown-key } { Unknown~key~'#1'~ignored. } @@ -4606,6 +4609,12 @@ latter of the two really shouldn't.\footnote{See \group_begin: + \int_zero:N \l_tmpa_int + \int_zero:N \l_tmpb_int + + \tl_clear:N \l_tmpa_tl + \tl_clear:N \l_tmpb_tl + \tl_map_inline:Nn \l_keys_key_tl { \tl_if_eq:nnTF { ##1 } { < } { @@ -4652,8 +4661,16 @@ specification. \tl_if_blank:nF{ #1 } { \tl_put_right:Nn \l_tmpb_tl {= #1} } - \@@_keys_set_overlay:VnV - \l_@@_overlay_tl { pseudo } \l_tmpb_tl +\end{source} +Rather than setting the keys here, inside a group, we put the code into a +variable that we'll expand outside the group, later: +\begin{source} + \tl_set:Nn \l_tmpa_tl { + \@@_keys_set_overlay:nnn + } + \tl_put_right:Nx \l_tmpa_tl { { \l_@@_overlay_tl } } + \tl_put_right:Nn \l_tmpa_tl { { pseudo } } + \tl_put_right:Nx \l_tmpa_tl { { \l_tmpb_tl } } } { \end{source} We have \emph{not} matched an overlay specification, so we just have an unknown @@ -4662,7 +4679,10 @@ arguments to \refc{\bslash}, we also permit a keyless value to be used to specify extra space (normally done using \refk{extra-space}). If the unknown key doesn't have an attached (non-blank) value, we treat the key itself as a value, and use it as extra space. If this, too, fails, we emit an error message. +Note that we'll also make sure the variable with the key-setting code is +empty. \begin{source} + \tl_clear:N \l_tmpa_tl \bool_if:nTF { \bool_lazy_and_p:nn { \l_@@_in_eol_bool } @@ -4678,10 +4698,15 @@ value, and use it as extra space. If this, too, fails, we emit an error message. } } - % Make sure extra space carries over outside the group: - \exp_args:NNNV + % Make sure extra space and key-setting carry over + % outside the group: + \exp_args:NNNVNNV \group_end: \tl_set:Nn \l_@@_extra_space_tl \l_@@_extra_space_tl + \tl_set:Nn \l_tmpa_tl \l_tmpa_tl + + % Run the key-setting code with overlay specification: + \l_tmpa_tl } diff --git a/Master/texmf-dist/doc/latex/pseudo/test/overlaytest.tex b/Master/texmf-dist/doc/latex/pseudo/test/overlaytest.tex new file mode 100644 index 00000000000..44bdb77c7a2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/pseudo/test/overlaytest.tex @@ -0,0 +1,12 @@ +\documentclass{beamer} +\usepackage{pseudo} + +\begin{document} +\begin{frame} +\begin{pseudo} + foo \\[dim<2->] + bar \\[dim<3>] + baz +\end{pseudo} +\end{frame} +\end{document} diff --git a/Master/texmf-dist/tex/latex/pseudo/pseudo.sty b/Master/texmf-dist/tex/latex/pseudo/pseudo.sty index 850b19fa141..2634ab7d38f 100644 --- a/Master/texmf-dist/tex/latex/pseudo/pseudo.sty +++ b/Master/texmf-dist/tex/latex/pseudo/pseudo.sty @@ -20,8 +20,8 @@ % OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE % SOFTWARE. % -\def \pseudoversion {1.2} -\def \pseudodate {2022/07/14} +\def \pseudoversion {1.2.1} +\def \pseudodate {2022/08/23} \RequirePackage{expl3} \ProvidesExplPackage {pseudo} @@ -44,9 +44,10 @@ \int_new:N \g__pseudo_indent_level_int \int_new:N \l__pseudo_initial_indent_level_int \bool_new:N \l__pseudo_in_eol_bool -\cs_generate_variant:Nn \quark_if_no_value:nTF { VTF } -\cs_generate_variant:Nn \tl_if_novalue:nTF { VTF } -\cs_generate_variant:Nn \tl_set:Nn { Ne } +\cs_generate_variant:Nn \quark_if_no_value:nTF { VTF } +\cs_generate_variant:Nn \tl_if_novalue:nTF { VTF } +\cs_generate_variant:Nn \tl_set:Nn { Ne } +\exp_args_generate:n { NNVNNV } \cs_new:Npn \__pseudo_undef_col:n #1 { \tl_set_eq:cN { NC@find@ \token_to_str:N #1 } \scan_stop: } @@ -455,10 +456,11 @@ } \cs_new:Npn \__pseudo_keys_set_overlay:nnn #1 #2 #3 { \bool_if:NT \c__pseudo_beamer_bool { - \only<#1>{ \keys_set:nn { #2 } { #3 } } + \tl_if_novalue:nF { #1 } { + \only<#1>{ \keys_set:nn { #2 } { #3 } } + } } } -\cs_generate_variant:Nn \__pseudo_keys_set_overlay:nnn { VnV } \msg_new:nnn { pseudo } { unknown-key } { Unknown~key~'#1'~ignored. } @@ -466,6 +468,10 @@ \keys_define:nn { pseudo } { unknown .code:n = { \group_begin: + \int_zero:N \l_tmpa_int + \int_zero:N \l_tmpb_int + \tl_clear:N \l_tmpa_tl + \tl_clear:N \l_tmpb_tl \tl_map_inline:Nn \l_keys_key_tl { \tl_if_eq:nnTF { ##1 } { < } { \int_incr:N \l_tmpa_int @@ -491,9 +497,14 @@ \tl_if_blank:nF{ #1 } { \tl_put_right:Nn \l_tmpb_tl {= #1} } - \__pseudo_keys_set_overlay:VnV - \l__pseudo_overlay_tl { pseudo } \l_tmpb_tl + \tl_set:Nn \l_tmpa_tl { + \__pseudo_keys_set_overlay:nnn + } + \tl_put_right:Nx \l_tmpa_tl { { \l__pseudo_overlay_tl } } + \tl_put_right:Nn \l_tmpa_tl { { pseudo } } + \tl_put_right:Nx \l_tmpa_tl { { \l_tmpb_tl } } } { + \tl_clear:N \l_tmpa_tl \bool_if:nTF { \bool_lazy_and_p:nn { \l__pseudo_in_eol_bool } @@ -508,9 +519,11 @@ { \l_keys_path_str } } } - \exp_args:NNNV + \exp_args:NNNVNNV \group_end: \tl_set:Nn \l__pseudo_extra_space_tl \l__pseudo_extra_space_tl + \tl_set:Nn \l_tmpa_tl \l_tmpa_tl + \l_tmpa_tl } } \cs_new:Npn \__pseudo_set:n #1 { \keys_set:nn { pseudo } { #1 } } |