4

I am using a document that I compile with the LaTeX class www.sigmetrics.org/sig-alternate-per.cls. This class used to work fine with TexLive 2019 but now that I am working with a machine that has a TexLive 2022, there seems to be problem with spacing:

For instance, let me consider the following code:

\documentclass{sig-alternate-per}

\begin{document}
\section{My section title}
This too close.
\end{document}

If I compile i with the machine with MacTex 2022, (pdfTeX 3.141592653-2.6-1.40.24 (TeX Live 2022)), it looks buggy: compiled code

If I compile with a 2019 TexLive (pdfTeX 3.14159265-2.6-1.40.19 (TeX Live 2019/dev/Debian), it looks fine: enter image description here

Would someone know if this bug comes from the class itself or from texlive? On my machine, I can fix it by adding line breaks but (1) I do not like this, and (2) it is problematic for sharing the code with people or transferring to arXiv that in general do not use the same latex version.

1
  • it is good in tl2021 bad in tl2020 Commented May 2, 2023 at 19:39

1 Answer 1

4

For not very obvious reasons, the class has

\def\section{%
    \@startsection{section}{1}{\z@}{-10\p@ \@plus -4\p@ \@minus -2\p@}% GM
    {4\p@}{\baselineskip 14pt\secfnt\@ucheadtrue}%
}

which is a silly mistake and always has been. It also has

\newfont{\secfnt}{ptmb at 12pt}

and several similar lines, which have been wrong since the introduction of NFSS in the early 90's. Yes, that makes about 30 years.

Fix for the particular issue. Several others may appear here and there.

\documentclass{sig-alternate-per}

\makeatletter
\renewcommand{\secfnt}{\usefont{\encodingdefault}{ptm}{b}{n}\fontsize{12}{14}\selectfont}
\def\section{%
    \@startsection{section}{1}{\z@}{-10\p@ \@plus -4\p@ \@minus -2\p@}% GM
    {15\p@}{\secfnt\@ucheadtrue}%
}
\makeatother

\begin{document}
\section{My section title}
This too close.
\end{document}

enter image description here

Why is the class mixing Times for titles with Computer Modern for running text is beyond my understanding.

5
  • 1
    I am not sure that this really fixes the problem: the example looks good with the 2022 (and 2023) but when compiling it with TexLive 2019, there is an extra linebreak that is added.
    – N. Gast
    Commented May 2, 2023 at 19:51
  • @N.Gast That's unavoidable, I guess. The class is simply doing silly things. But what would be the reason to use TL 2019 in 2023?
    – egreg
    Commented May 2, 2023 at 19:56
  • 1
    @egreg Reason to use TL 2019 in 2023? Perhaps TL is installed network-wide at a university, and cannot be upgraded by any user, only by a network manager who has other things to do. At the university library where I am now, there are several network commercial programs that are years out of date. At least one of them regularly crashes. And, this is a university that is known for its computer science.
    – user287367
    Commented May 2, 2023 at 22:30
  • @egreg I understand that the class is doing silly things... It has not been updated for a while and does not seem to be really maintained. But we are "required" to use it.
    – N. Gast
    Commented May 3, 2023 at 0:02
  • 2
    The reason to use TL 2019 is indeed that I have multiple co-authors that have different TL. I could ask them to upgrade their TL, but when collaborating with overleaf or posting the paper on arXiv, we cannot control which TL is installed (for instance, arXiv currently use the 2020 version). And I realized that with multiple classes, spacing varies as a function of the TL used.
    – N. Gast
    Commented May 3, 2023 at 0:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .