0

I have an issue with the latex glossary package, in that it is incompatible with the lni documenttype.

The following code

\documentclass{lni}
\usepackage[utf8]{inputenc}
\usepackage[]{glossaries}
\makeglossaries
\title{test}
\author{author}
\date{December 2020}
\begin{document}
\maketitle
\section{Introduction}
\end{document}

gets me especially this error:

You can't use `\let' after \the.

\new@ifnextchar #1#2#3->\let \reserved@d = #1\def \reserved@a {#2}\def \rese... l.15 \end{document}

I'm forgetting what you said and using zero instead.

as soon as I use anything that is not lni, or remove the \makeglossaries, it works no problem. I am using the pdftex compiler. Any ideas?

mike
  • 1

1 Answers1

0

The class redefines \year to be used an normal macro, which is not a good idea, because its value is used by packages like glossaries. A workaround for your problem is to set the year explicitly in your document, e.g. \year=2020 and to revert \year to its original definition (which is saved as \@rigyear) after it has been used, i.e. after \maketitle:

\maketitle
\makeatletter\let\year\@rigyear\makeatother
...
Martin
  • 919
  • Reverting the definition of \year is enough. You do not have to set the year. You could even use the intended way of \year{2019} as long as this happens after \begin{document} and before \maketitle – Martin Dec 03 '20 at 20:14
  • BTW: The lni class is available on CTAN and as well part of MiKTeX and TeX Live – Martin Dec 03 '20 at 20:25
  • I fixed the files on GitHub (https://github.com/gi-ev/LNI/) – Martin Dec 03 '20 at 20:29
  • You should remove that redefinition of \year as soon as possible. I understand that this can invalidate older documents, but keeping it is likely to break *many* packages. You're not alone, unfortunately: 1 2 I see no reason whatsoever for making \year into a user-space command when it can be more semantically \submissionyear, \publicationyear or similar. – egreg Dec 03 '20 at 21:00
  • This class as many others has its history. Moreover as article class for a specific journal it has a rather limited scope of additional packages. It has been used by many users without problems over the last years. Using glossaries seems a bit odd to me, but in general you are right. It was a wrong decision and should be corrected. – Martin Dec 04 '20 at 07:18
  • Version v1.7 of the lni class drops \year and uses \yearofpublication instead. – Martin Mar 02 '21 at 10:12