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

Documenting F form when TF does not exist #892

Open
dbitouze opened this issue Apr 29, 2021 · 8 comments
Open

Documenting F form when TF does not exist #892

dbitouze opened this issue Apr 29, 2021 · 8 comments
Labels
bug Something isn't working documentation Issues in the documenation l3doc

Comments

@dbitouze
Copy link
Contributor

\file_if_exist_input:nTF is still indexed in interface3.pdf, though deprecated (more precisely, what seems to deprecated is \file_if_exist:nT).

@josephwright
Copy link
Member

What gives you the idea these are deprecated?

@dbitouze
Copy link
Contributor Author

What gives you the idea these are deprecated?

The compilation of the following MCE:

\documentclass{article}
\begin{document}
\ExplSyntaxOn
\file_if_exist_input:nTF {Foo} {Bar} {Baz}
\ExplSyntaxOff
\end{document}

returns:

! LaTeX3 Error: Use \file_if_exist:nT and \file_input:n not
(LaTeX3) \file_if_exist_input:nTF deprecated on 2018-03-05.

Type to continue.
...

l.21 \file_if_exist_input:nTF
{Foo} {Bar} {Baz}

@josephwright
Copy link
Member

Ah, right: this one is tricky as we've kept the n and nF forms.

@dbitouze
Copy link
Contributor Author

dbitouze commented Apr 29, 2021

BTW, I don't understand why it has been deprecated as it would be still useful for cases as the following one:

\file_if_exist_input:nTF {foo}{
  \pdfbookmark[1]{Foo}{foo}
}{
  \msg_warning:nn{module}{`foo~file~is~missing!}
}

Okay, this can be achieved with:

\file_if_exist:nTF {foo}{
  \file_input:n {foo}
  \pdfbookmark[1]{Foo}{foo}
}{
  \msg_warning:nn{module}{`foo~file~is~missing!}
}

but that's less handy.

@josephwright
Copy link
Member

The problem is 'where does the T branch live' - it's not at all clear whether such a branch goes before or after the input, and whichever one picks, there will be use cases for the opposite one.

@u-fischer
Copy link
Member

BTW, I don't understand why it has been deprecated as it would be still useful for cases as the following one:

Why would you execute the \pdfbookmark after the processing of the file?

@dbitouze
Copy link
Contributor Author

Why would you execute the \pdfbookmark after the processing of the file?

Oooops! Before, of course 😄

@blefloch blefloch added bug Something isn't working documentation Issues in the documenation l3doc labels Apr 29, 2021
@blefloch
Copy link
Member

blefloch commented Apr 29, 2021

See #253, which suggests \file_if_exist_input:nnTF (file) (preliminary set up) (true code after the file is input) (false code if not input). I think we should continue that discussion there.

Here we should keep the indexing issue: the deprecated function \file_if_exist_input:nTF shouldn't be indexed. What is happening is that \file_if_exist_input:nF is indexed as its base form \file_if_exist_input:nTF. This is similar to #618 where l3doc assumes that some base form exists when it doesn't actually exist. Probably the fixes will be related.

@blefloch blefloch changed the title \file_if_exist_input:nTF still indexed Documenting F form when TF does not exist May 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Issues in the documenation l3doc
Projects
No open projects
Development

No branches or pull requests

4 participants