Text FormattingDefinition caption crosses column boundaries

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Sadeq
Posts: 10
Joined: Sun May 24, 2009 7:49 am

Definition caption crosses column boundaries

Post by Sadeq »

I have a two-column page, and defined a ``theorem like'' environment for my definitions:

Code: Select all

\documentclass[twocolumn]{article}
\newtheorem{definition}{Definition}
\begin{document}
    \noindent
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod ...
  
    \begin{definition}[A very long caption for the definition goes here]
        Definition body here...
    \end{definition}
\end{document} 
If you compile the above snippet, you'll see that Definition's caption crosses column boundaries.

How can I fix this?
Last edited by Sadeq on Sat Jan 02, 2010 7:24 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Sadeq
Posts: 10
Joined: Sun May 24, 2009 7:49 am

Re: Definition caption crosses column boundaries

Post by Sadeq »

This forum used to be much more active!
I was expecting a workaround within several hours, but it's been several days and no response.

Could anyone help me on this, please? :oops:
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Definition caption crosses column boundaries

Post by localghost »

Sadeq wrote:This forum used to be much more active!
I was expecting a workaround within several hours, but it's been several days and no response. [...]
With regard to your join date I think that you are not really qualified to gage that. Take into account that recently there has been Christmas and turn of the year so that many board members may be absent for holidays.

Concerning your problem you should use packages like amsthm to balance this weakness of vanilla LaTeX and get the desired result.

Code: Select all

\documentclass[11pt,a4paper,twocolumn,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{blindtext}

\theoremstyle{definition}
  \newtheorem{definition}{Definition}

\begin{document}
  \blindtext

  \begin{definition}[A very long caption for the definition goes here]
    \blindtext
  \end{definition}
\end{document}
You can also try the ntheorem package to format such constructions.


Best regards
Thorsten
Sadeq
Posts: 10
Joined: Sun May 24, 2009 7:49 am

Definition caption crosses column boundaries

Post by Sadeq »

localghost wrote:
Sadeq wrote:This forum used to be much more active!
I was expecting a workaround within several hours, but it's been several days and no response. [...]
With regard to your join date I think that you are not really qualified to gage that. Take into account that recently there has been Christmas and turn of the year so that many board members may be absent for holidays.
Hey, no offense! I didn't mean that the forum is dead! I just wanted to encourage people to help me, be it holiday or not :mrgreen:

Anyway, I'm very thankful for your answer. Problem solved! :lol:
Post Reply