我在一份文档中有一个定理acmsmall
,尽管标题很长,但标题中不会出现换行符:
\documentclass[prodmode,acmtosn]{acmsmall}
\begin{document}
\begin{theorem}[long long long long long long long long long long long long long long long long long long long long long long long long long long title]
content...
\end{theorem}
\end{document}
答案1
定理是列表。标题是通过 \item 的可选参数设置的,并且实际上在您的类中位于 \box 中。不会中断。
您可以尝试通过更改空可选参数的行为来伪造合适的外观。但我认为缩短标题会更好。
\documentclass[prodmode,acmtosn]{acmsmall}
\makeatletter
\def\@opargbegintheorem#1#2#3{%
\trivlist
\item[\hskip 12pt
\hskip \labelsep
{\ifitalicenv{\scshape{#1}}\else{\itshape#1}\fi%
\savebox\@tempboxa{\ifitalicenv{\scshape#3}\else{\itshape#3}\fi}%
\ifdim\wd\@tempboxa>\z@%
\ {\rmfamily #2}\unskip\hskip5pt\relax$($\box\@tempboxa$)$.%
\else \ {\rmfamily #2}\unskip\hskip5pt\relax
\fi\unskip\hskip5pt}]
\ifitalicenv\itshape\else\upshape\fi\hskip-\labelsep}
\makeatother
\begin{document}
\begin{theorem}[blub]
content...
\end{theorem}
\begin{theorem}[] {$($\scshape long long long long long long long long long long long long long long long long long long long long long long long long long long title$)$.\unskip\hskip5pt}
content...
\end{theorem}
\end{document}