Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ltnews35: reads as if IfBlankTF can be used to detect a key without a value #857

Closed
Skillmon opened this issue Jun 13, 2022 · 2 comments
Closed
Assignees

Comments

@Skillmon
Copy link
Contributor

In the latest ltnews the subsection about \IfBlankTF reads as if it would be possible to tell key apart from key={}:

This test can also be useful if you set up key/value options and want to test if a key was specified without giving a value, vs. specifying "key= ,".

Actually that isn't possible at all with the current behaviour (and if it would it would make more sense to use the IfNoValueTF tests).

Try the following example to see that this doesn't work as hinted by ltnews:

\begin{filecontents*}{quickytesty.sty}
\ProvidesPackage{quickytesty}

\ExplSyntaxOn
\DeclareKeys
  {%
    test .code = \tl_analysis_show:n {#1}
  }
\ProcessKeyOptions\relax
\ExplSyntaxOff
\end{filecontents*}
\RequirePackage[test,test=]{quickytesty}
\stop

That produces:

The token list is empty
> .
<recently read> }

l.8 \ProcessKeyOptions\relax

?
The token list is empty
> .
<recently read> }

l.8 \ProcessKeyOptions\relax

?
@josephwright josephwright self-assigned this Jul 22, 2022
@josephwright
Copy link
Member

I will adjust here including details how this can be approached

josephwright added a commit that referenced this issue Jul 23, 2022
The second part is to document how to do this:
goes elsewhere.
@josephwright
Copy link
Member

I'm going to close the issue here and log a separate one about documenting the new keyval stuff generally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants