josephwright / achemso

LaTeX class for submissions to the American Chemical Society (ACS), and BibTeX styles for all ACS journals
Other
25 stars 14 forks source link

"Unused global options" for class options #42

Closed Jellby closed 9 months ago

Jellby commented 1 year ago

It seems passing options to \documentclass triggers a "Unused global option(s)" warning, even if the options are obviously used:

\documentclass[journal=jctcce,manuscript=suppinfo]{achemso}
\title{Foo}
\begin{document}
Bar
\end{document}
LaTeX Warning: Unused global option(s):
    [journal=jctcce,manuscript=suppinfo].
jfdoolster commented 10 months ago

same thing here:

\documentclass[email=false]{achemso}
\title{foo}
\begin{document}
bar
\end{document}
Unused global option(s):
    [email=false].
josephwright commented 10 months ago

I'm wondering if I want to risk a fix here: would mean a change of option handler, and that's likely to cause wider issues

jfdoolster commented 10 months ago

I'm wondering if I want to risk a fix here: would mean a change of option handler, and that's likely to cause wider issues

not worth causing other issues, warning can be ignored similar to over/underfill

fxcoudert commented 9 months ago

I would argue this is actually a pain point: some TeX software knows that overfill/underfill are a different category and has options to silence them (or put them in a separate category). But class warnings are generally serious, and show up. This is the case in Overleaf for example, and having warnings that show up in all cases mean that users simply start ignoring all warnings, which is bad habit.

josephwright commented 9 months ago

I gave this a bit more thought. It's not actually an achemso issue per se as it's arisen due to changes in option handling more generally. Now, true, I could simply use a different option handling approach, but I will take a look at the underlying issue first.

josephwright commented 9 months ago

Right, we seem to have an idea where this comes from: definitely an xkeyval issue. I'm wondering about whether to move away to ltkeys, but that has some tricky aspects too.

u-fischer commented 9 months ago

It is imho a clear bug in the xkeyval package introduced in version 2.9 (2022/06/16). If I switch to an older xkeyval it works.

xkeyval tries to remove journal from the list journal=jctcce,manuscript=suppinfo, and that simply doesn't work with \@removeelement. It should either sanitize the list from journal=jctcce,manuscript=suppinfo to journal,manuscript, or change its method to remove an option.

josephwright commented 9 months ago

I've taken another look at a fix from the achemso end and it's simply too risky at the moment. We need the code to work with LaTeX from at least five if not 10 years ago, so any 'conditional' setup becomes horrible.

josephwright commented 9 months ago

Right, I decided that at this stage xkeyal can't be dropped, but I can force-suppress the warning, which I hope is acceptable.