For reasons I don't understand, the Springer Nature LaTeX authoring template (available via Overleaf and on Springer Nature's site) causes extra space to be inserted after semicolons in math mode.
For example, the following MWE yields:
\documentclass[sn-mathphys,pdflatex]{sn-jnl}
\begin{document}
\begin{equation}
(x,y)\quad (x;y)
\end{equation}
\end{document}
Whereas replacing the first line with \documentclass{article}
yields the expected spacing:
Is it possible to override this behavior in my document without altering the sn-jnl.cls file directly? In particular, is it possible to do this in a more elegant way than e.g. replacing every instance of ;
in my document with {;}
or /!/!;
?
Edit: As @egreg points out in his answer, the spacing after the semicolon can be avoided by disabling the loading of the program
package. However, this approach somehow causes errors (that are not present when the program
package is allowed to load) when using the proof environment:
Second Edit: From the comment of @egreg below, a satisfactory solution is given by placing the following before \begin{document}
:
\makeatletter
\disable@package@load{program}{} %prevent program package from loading
\makeatother
\documentclass[sn-mathphys,pdflatex]{sn-jnl}
\AtBeginDocument{\renewcommand\qedsymbol{\ensuremath{\opensquare}}} %fix class bug with proof environment
Best Answer
The
sn-jnl
class loads, for no apparent reason, the packageprogram
that does silly settings and is the cause of a lot of problems with the class.In particular, the package defines the semicolon as math active to produce, in math mode, the standard semicolon as punctuation followed by a thick space.
You can disable loading the package
program
.Complain with Springer that they should, at least, provide an option for not loading
program
.