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

Add options to unused list when unknown key is active #1184

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

josephwright
Copy link
Member

No description provided.


\endinput
\end{filecontents}
\documentclass[a4paper,test=wtf,bertha]{github-1183}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use an extra option which is unknown to both article and githu-1183 classes, to trigger the "Unused global option(s)" waning?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still shouldn't see a warning?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a conceptual point I think that global options should be handled as follows:

  • if a package uses a global option it is marked as used (but still offered to other packages as a global option)
  • if no package uses a global option there should be an "unused global option warning"

The big question is what does this mean if a a package defines an unknown option handler?

  • Given that for the default unknown option handler (raising an unknown option error) global options are ignored one can argue that the same should happen if a different unknown option handler is implemented
  • Another possibility is to pass global options to an unknown option handler (if it is not the default) and consider them used if that happens (that means that with one such package we would automatically use all global options and there is no warning ever)
  • Finally one could implement some sort of a mix of the two by offering an interface to be used in the unknown option handler to explicitly mark a global option as used if it is passed through and is handled (not sure how that should look like exactly)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still shouldn't see a warning?

@josephwright I'm not sure which behavior is expected (#1183 has some discussions on it), but with current proposed change, if aaapaper is used as class option, it will remain in unused options list. See muzimuzhi@5875883.

Copy link

This PR has been automatically marked as stale because it has not had recent activity.

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

Successfully merging this pull request may close these issues.

unknown-keyhandler disables removing from unused options
3 participants