I have a document in acmart
style, which uses some old package. This package modifies baselinestretch
somehow. In the end, I see this in the log:
Class acmart Error: An attempt to redefine \baselinestretch detected.
Please do not do this for ACM submissions!.
What would be a reasonable workaround? I can't change the package. I just want acmart
to stop printing this error message. I also don't want to modify acmart.cls
. It seems that that I should add something right before \end{document}
to reset this length back to what acmart
expects…
The code I have is this:
\documentclass[sigplan,nonacm]{acmart}
\usepackage{oz}
\begin{document}
Hello, world!
\end{document}
Best Answer
The default definition of
\baselinestretch
in the LaTeX kernel is empty and theoz
package wants to modify the kernel macro\@setfontsize
in such a way that also the internal\zedbaselineskip
parameter is adjusted at each font size change. It doeswhere the part from
\setlength
is added. It's pure luck that\@setfontsize
hasn't been changed in the last 23 years… Anyway, the problem is the division by\baselinestretch
, so the packages takes the initiative to doWell, it was a very unfortunate decision, in my opinion, just to avoid a simple conditional, see the proposed fix.
The
acmart
class sets\baselinestretch
to1.25
and refuses to compile if the value is changed. So you must reset the baseline stretch to the previous value after loadingoz
, or the appearance of the document will not conform the ACM standards.Since you probably use the package
oz
also in other documents, you should also fix it so that it does not take inappropriate initiatives such as changing\baselinestretch
without warning.The output with the “fix” proposed by David Carlisle would be
which would probably cause rejection of your submission anyway.