The following latex code produces a definition that its text overlaps to the 2nd column. The ijcai18 package makes it a 2-column article, so perhaps the problem is there ? I do not know how to read it.
\documentclass{article}
\usepackage{ijcai18}
\usepackage{lipsum}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{definition}[theorem]{Definition}
\begin{document}
\begin{definition} [This is a long definition title that does not wrap to the next line]
...
\end{definition}
\lipsum[1-5]
\end{document}
The ijcai18
conference style does not add any theorem-related functionality. As such, \newtheorem{definition}[.]{Definition}
still relies on LaTeX's original definition for creating the theorem-like environments.
In LaTeX, theorems as defined via \newtheorem
is set as a list, with the entire theorem consisting of a singular \item
. The title of the theorem is passed as the optional argument to \item
(that is, \item[<theorem title stuff>]
, and this optional argument is set inside a box that doesn't allow for line-breaking.
Below I redefine the part that sets the \item
specifically for a theorem that has an optional argument (like in your case, \begin{definition}[..]
). Here's the original definition (from the LaTeX kernel):
\def\@opargbegintheorem#1#2#3{\trivlist
\item[\hskip \labelsep{\bfseries #1\ #2\ (#3)}]\itshape}
and here's the changed definition:
\def\@opargbegintheorem#1#2#3{\trivlist
\item[]{\bfseries #1\ #2\ (#3)} \itshape}
\documentclass{article}
\usepackage{ijcai18}% http://www.ijcai.org/authors_kit
\usepackage{lipsum}
\newtheorem{definition}{Definition}
\makeatletter
\def\@opargbegintheorem#1#2#3{\trivlist
\item[]{\bfseries #1\ #2\ (#3)} \itshape}
\makeatother
\begin{document}
\begin{definition}[This is a long definition title that does not wrap to the next line]
\lipsum[1]
\end{definition}
\lipsum[2-5]
\end{document}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With