This is a follow-up question to this question, as suggested by Ioannis Filippides.
The question is about the fact that a long theorem title may be longer than the column width, and it is not continued on the next line automatically. In the referenced question, it is suggested to load a package such as amsthm. (If this generates an error message, it can be solved as explained in this question.)
The problem is that this approach changes the lay-out (theorem title bold instead of normal, theorem text italic instead of normal) when used with the IEEEconf class. Is there an other way to solve the problem of the long title while maintaining the original lay-out of the IEEEconf class?
MWE:
\documentclass[a4paper, 12pt]{ieeeconf}
\usepackage{lipsum}
\newtheorem{theorem}{Theorem}
\begin{document}
Hello, see my nice theorem below.
\begin{theorem}[A title that is too long so it stretches outside the column]
\lipsum[1]
\end{theorem}
\end{document}
Result of the MWE:
Adding \usepackage{amsthm} to the MWE, I obtain the error message
! LaTeX Error: Command \proof already defined.
and I obtain following result where the title is split over 2 lines but the lay-out is changed:
For reference, here's how IEEEconf (re)defines the theorem commands.
%% ENVIRONMENTS
% "box" symbols at end of proofs
\def\QEDclosed{\mbox{\rule[0pt]{1.3ex}{1.3ex}}} % for a filled box
% V1.6 some journals use an open box instead that will just fit around a closed one
\def\QEDopen{{\setlength{\fboxsep}{0pt}\setlength{\fboxrule}{0.2pt}\fbox{\rule[0pt]{0pt}{1.3ex}\rule[0pt]{1.3ex}{0pt}}}}
\def\QED{\QEDclosed} % default to closed
\def\proof{\noindent\hspace{2em}{\itshape Proof: }}
\def\endproof{\hspace*{\fill}~\QED\par\endtrivlist\unskip}
%\itemindent is set to \z@ by list, so define new temporary variable
\newdimen\@IEEEtmpitemindent
\def\@begintheorem#1#2{\@IEEEtmpitemindent\itemindent\topsep 0pt\rmfamily\trivlist%
\item[\hskip \labelsep{\indent\itshape #1\ #2:}]\itemindent\@IEEEtmpitemindent}
\def\@opargbegintheorem#1#2#3{\@IEEEtmpitemindent\itemindent\topsep 0pt\rmfamily \trivlist%
% V1.6 IEEE is back to using () around theorem names which are also in italics
% Thanks to Christian Peel for reporting this.
\item[\hskip\labelsep{\indent\itshape #1\ #2\ (#3):}]\itemindent\@IEEEtmpitemindent}
\def\@endtheorem{\endtrivlist\unskip}
% V1.6
% display command for the section the theorem is in - so that \thesection
% is not used as this will be in Roman numerals when we want arabic.
% LaTeX2e uses \def\@thmcounter#1{\noexpand\arabic{#1}} for the theorem number
% (second part) display and \def\@thmcountersep{.} as a separator.
\def\@IEEEthmcounterin#1{\arabic{#1}}
% redefine the #1#2[#3] form of newtheorem to use a hook to \@IEEEthmcounterin
\def\@xnthm#1#2[#3]{%
\expandafter\@ifdefinable\csname #1\endcsname
{\@definecounter{#1}\@newctr{#1}[#3]%
\expandafter\xdef\csname the#1\endcsname{%
\noexpand\@IEEEthmcounterin{#3}\@thmcountersep\@thmcounter{#1}}%
\global\@namedef{#1}{\@thm{#1}{#2}}%
\global\@namedef{end#1}{\@endtheorem}}}




ieeeconf, and don't know whether it's even compatible withamsthm. However,amsthmdoes support three different theorem styles, of which the stylesdefinitionandremarkset the content in ordinary type, and it's also possible to define new theorem styles in which the heading font is changed. See the user documentation: `texdoc amsthdoc'. – barbara beeton Feb 25 '20 at 18:38ieeeconf.clsthat concerns theorems. Instead of loading amsthm you can consider modifying the definition of\@opargbegintheoremyourself. Note that currently the theorem header and headline are set as the item label in atrivlist. So the solution could be as simple as moving the(#3)out from under the\item[...]and adjusting the spacing and font family accordingly. – Willie Wong Feb 26 '20 at 15:05