TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There seems to be an incompatibility between the svjour3 document class for Springer journals and the microtype package. Minimal example:

\documentclass{svjour3}
\usepackage{microtype}
\begin{document}
\end{document}

This results in 90 lines of the form

(\end occurred when \ifx on line 63 was incomplete)

being written to standard out.

Is there any workaround?

share|improve this question
up vote 9 down vote accepted

The size option file of the class (svjour3.clo) defines the font sizes \normalsize, \small and \footnotesize so that they contain two \ifs. E.g. :

\renewcommand\normalsize{%
\if@twocolumn
   \@setfontsize\normalsize\@xpt{12.5pt}%
\else
   \if@smallext
      \@setfontsize\normalsize\@xpt\@xiipt
   \else
      \@setfontsize\normalsize{9.5pt}{11.5pt}%
   \fi
\fi
   \abovedisplayskip=3 mm plus6pt minus 4pt
   \belowdisplayskip=3 mm plus6pt minus 4pt
   \abovedisplayshortskip=0.0 mm plus6pt
   \belowdisplayshortskip=2 mm plus4pt minus 4pt
   \let\@listi\@listI}

That's rather unusual and it obviously confuse microtype. I don't understand why they put the if-switches in the font definitions - I doubt that they want to switch the sizes inside a document. Perhaps they only want to avoid to have to copy the \abovedisplayskip part around.

You will have to rearrange the definitions:

\documentclass{svjour3}
\makeatletter
\if@twocolumn
  \renewcommand\normalsize{%
   \@setfontsize\normalsize\@xpt{12.5pt}%
   \abovedisplayskip=3 mm plus6pt minus 4pt
   \belowdisplayskip=3 mm plus6pt minus 4pt
   \abovedisplayshortskip=0.0 mm plus6pt
   \belowdisplayshortskip=2 mm plus4pt minus 4pt
   \let\@listi\@listI}%

  \renewcommand\small{%
   \@setfontsize\small{8.5pt}\@xpt
   \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@
   \abovedisplayshortskip \z@ \@plus2\p@
   \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
   \def\@listi{\leftmargin\leftmargini
               \parsep 0\p@ \@plus1\p@ \@minus\p@
               \topsep 4\p@ \@plus2\p@ \@minus4\p@
               \itemsep0\p@}%
   \belowdisplayskip \abovedisplayskip}

\else
  \if@smallext
   \renewcommand\normalsize{%
   \@setfontsize\normalsize\@xpt\@xiipt
   \abovedisplayskip=3 mm plus6pt minus 4pt
   \belowdisplayskip=3 mm plus6pt minus 4pt
   \abovedisplayshortskip=0.0 mm plus6pt
   \belowdisplayshortskip=2 mm plus4pt minus 4pt
   \let\@listi\@listI}%

  \renewcommand\small{%
   \@setfontsize\small\@viiipt{9.5pt}%
   \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@
   \abovedisplayshortskip \z@ \@plus2\p@
   \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
   \def\@listi{\leftmargin\leftmargini
               \parsep 0\p@ \@plus1\p@ \@minus\p@
               \topsep 4\p@ \@plus2\p@ \@minus4\p@
               \itemsep0\p@}%
   \belowdisplayskip \abovedisplayskip}
 \else
  \renewcommand\normalsize{%
   \@setfontsize\normalsize{9.5pt}{11.5pt}%
   \abovedisplayskip=3 mm plus6pt minus 4pt
   \belowdisplayskip=3 mm plus6pt minus 4pt
   \abovedisplayshortskip=0.0 mm plus6pt
   \belowdisplayshortskip=2 mm plus4pt minus 4pt
   \let\@listi\@listI}%  

  \renewcommand\small{%
   \@setfontsize\small\@viiipt{9.25pt}%
   \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@
   \abovedisplayshortskip \z@ \@plus2\p@
   \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
   \def\@listi{\leftmargin\leftmargini
               \parsep 0\p@ \@plus1\p@ \@minus\p@
               \topsep 4\p@ \@plus2\p@ \@minus4\p@
               \itemsep0\p@}%
   \belowdisplayskip \abovedisplayskip}
  \fi
\fi
\let\footnotesize\small
\makeatother

\usepackage{microtype}
\begin{document}
abc
\end{document}
share|improve this answer
1  
“I don't understand why they put the if-switches in the font definitions” ... looking at the before and after code, it seems that they were trying to factor our common parts of the code. (?) – Juan A. Navarro Aug 4 '11 at 8:32
2  
Thanks Ulrike! I copied the svglov3.clo file to svglov3-fix.clo, made the relevant changes, and then passed the glov3-fix option to the document class which loads mine instead. – TH. Aug 4 '11 at 16:28
    
"I doubt that they want to switch the sizes inside a document" - maybe they wanted to do just that, e.g., whenever one switches between single and two columns? – bers Jul 20 at 18:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.