borisveytsman / acmart

ACM consolidated LaTeX styles
567 stars 249 forks source link

Options used but nevertheless reported as unused global option(s) #533

Open cabohah opened 2 weeks ago

cabohah commented 2 weeks ago

acmart reports options as unused global options, even if they are used. For example

\documentclass[twocolumn]{acmart}
\usepackage{lipsum}
\begin{document}
\lipsum
\end{document}

results in:

LaTeX Warning: Unused global option(s):
    [twocolumn].

This also happens with key=value options:

\documentclass[sigconf,twocolumn,balance=true]{acmart}
\usepackage{lipsum}
\begin{document}
\lipsum
\end{document}

results in

LaTeX Warning: Unused global option(s):
    [twocolumn,balance=true].

and additionally in

Package balance Warning: You have called \balance in second column
(balance)                Columns might not be balanced.

because the \balance in \AtEndDocument is too late, but maybe this second warning is intended.

The issue with false reporting of unused global options is IMHO because of using xkeyval. Maybe you could switch to LaTeX's key-value option handling to avoid it.

See also: Unused Balance Option Warnings in ACM Template.

cabohah commented 2 weeks ago

Note: The issue with options to amsart can be fixed changing acmart.cls line 177:

\DeclareOptionX{*}{\PassOptionsToClass{\CurrentOption}{amsart}}

to

\DeclareOptionX*{\PassOptionsToClass{\CurrentOption}{amsart}}

But the issue with key-value options is not influenced by this change.