1

Put

\documentclass{svmono}%%% v5.6 from http://www.springer.com/gp/authors-editors/book-authors-editors/resources-guidelines/rights-permissions-licensing/manuscript-preparation/5636
\begin{document}
\begin{example}\label{e}
\end{example}
\end{document}

into file.tex. Running pdflatex on it produces

$ pdflatex file
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2019/dev/Debian) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./file.tex
LaTeX2e <2018-04-01> patch level 5
(./svmono.cls
Document Class: svmono 2018/06/25 v5.6 
Springer Verlag global LaTeX document class for monographs
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def)
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/x11nam.def))
(/usr/share/texlive/texmf-dist/tex/latex/ntheorem/ntheorem.sty
Style `ntheorem', Version 1.33 <2011/08/15>
(/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty)))
No file file.aux.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
))
! Incomplete \iffalse; all text was ignored after line 3.
<inserted text> 
                \fi 
<*> file

?

What's wrong? Is there any way to hack svmono to correct it? Of course, the above example is very minimal. In reality, you'd have other packages and text around and inside the environment. A simple workaround would be providing an empty text: \begin{example}{}\label{e}\end{example}, but this would go against the fact that example in §2.6 of refguide.pdf (dated 2019-02-05) is declared as taking no arguments or one (optional) argument. I'm wondering whether it's possible to correct svmono such that it behaves as usual, which is printing simply

Example 1.

The previous class version (svmono v5.5) succeeds without problems in this situation.

(PS. Plz don't lambast me too much: I cannot get Springer's help directly first-hand; my prior e-mails have been rejected on the SMTP level. So, if anyone from Springer reads here: plz see @moewe's answer and improve, e.g, by removing the redefinition in lines 1980-1981.)

12
  • 1
    You probably need to read the manual. example now takes a mandatory argument and isn't too happy using \label for this. You can test it if you replace \label with test, then the t is used for some kind of headline.
    – daleif
    Mar 28 '19 at 15:30
  • I looked at the code, it is not. I just looked in the manual and it does not seem to be documented there, example is listed along side theorem, which behaves differently.
    – daleif
    Mar 28 '19 at 15:33
  • 1
    The example environment is first defined as a theorem like construction on line 1498 and then redefined to take a mandatory argument on line 1980 of svmono.cls
    – daleif
    Mar 28 '19 at 15:34
  • Seems to be an oversight. The class defines example twice: Once with \spn@wtheorem{exercise}{Exercise}{\bfseries}{\rmfamily} as all other theorem-like environments and then later it does \renewenvironment{example}[1] which means that example takes a mandatory argument.
    – moewe
    Mar 28 '19 at 15:35
  • You can get back the theorem-like definition with \makeatletter \let\example\relax \spn@wtheorem{example}{Example}{\itshape}{\rmfamily} \makeatletter
    – moewe
    Mar 28 '19 at 15:36
3

svmono.cls defines example twice. Once in a theorem-like manner in line 1498 with

\spn@wtheorem{example}{Example}{\itshape}{\rmfamily}

presumably this is the documented definition.

Later on in the block %%%SOPHIE TEMPLATE BEGIN%%% in ll. 1980-1981 the class does

\renewenvironment{example}[1]{\ignorespaces\def\stmtopen##1{##1}%
\formtmp{example}{#1}}{\par\noindent\textcolor{example}{\rule{\columnwidth}{1pt}}\vskip2pt\par\addvspace{\baselineskip}}%

Which redefines example and in particular means that it now takes a mandatory argument. This is exactly what becomes problematic in the MWE because the \label is now absorbed as the mandatory argument.

Sophie's template is a new addition for version 5.6 of svmono.cls.

You can get back the presumably intended definition by adding

\makeatletter
\let\example\relax
\spn@wtheorem{example}{Example}{\itshape}{\rmfamily}
\makeatletter

to your preamble. Of course you could also comment out the unwanted \renewenvironment{example}.

A similar effect can be observed for question.


This looks like a bug in the class (or in the documentation) and it should be reported to the maintainer (SMTP failure or otherwise).

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy