svjour3
Springer 期刊的文档类和包之间似乎存在不兼容性microtype
。最小示例:
\documentclass{svjour3}
\usepackage{microtype}
\begin{document}
\end{document}
结果是 90 行形式
(\end occurred when \ifx on line 63 was incomplete)
正在写入标准输出。
有什么解决方法吗?
答案1
类的大小选项文件(svjour3.clo
)定义字体大小\normalsize
,\small
并且\footnotesize
使它们包含两个\if
s。例如:
\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}
这很不寻常,而且显然会让人感到困惑microtype
。我不明白他们为什么要在字体定义中放置 if 开关——我怀疑他们是否想在文档中切换大小。也许他们只是想避免必须复制部分\abovedisplayskip
内容。
您必须重新排列定义:
\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}