Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I use TeXLive 2011.

I use and . In a theorem environment, I want the theorem header to be separated from the body by a line break such that the multicols-environment get's that and starts its second column at the same height as the first in the body.

This is roughly where the problem came from – in combination with a list from :

version 1 – using indentbreak version 2 – using break

However – while writing the question, I noticed it can be cut down to the following minimal code:

\documentclass{scrreprt}
    \usepackage{
        ntheorem,
        multicol,
    }

\usepakage{lipsum}

\makeatletter  
    \newtheoremstyle{indentbreak}
        {\item[##1]}
        {\item[\rlap{\vbox{\hbox{##3}\hbox{\strut}}}]}
\makeatother

\theoremstyle{indentbreak}
%\theoremstyle{break}
\newtheorem{indentbreaktheorem}{Theorem}

\begin{document}
    \begin{indentbreaktheorem}[Talking a lot and a lot and a lot and lot and a lot and a lot and a lot.]
        \begin{multicols}{2}
            \lipsum*[1]
        \end{multicols}{2}
    \end{indentbreaktheorem}
\end{document}

Which looks like this using the self-defined indentbreak environment:

version 1 – using indentbreak

The break environment yields a similar result (as above with the listings).

How can I define a theorem style such that this issue is resolved? I want to stay with , but I am also interested in solutions for .

share|improve this question
add comment

1 Answer 1

you don't really need anything that complicated. using the default theorem style of amsthm, all you need to do to break it to a new line is put

\leavevmode

right after the optional text, as

\begin{theorem}[optional text]\leavevmode

downsides:

  • the optional text will be lightface roman, not bold (as it is formatted with ntheorem),

  • if the optional text is very long, it won't automatically split to a second line (but that's also a problem with ntheorem).

both of these (mis)features are on the list to be reconsidered with the next overhaul of amsthm, but that hasn't been scheduled yet.

share|improve this answer
    
I have also set up an environment with ntheorem to allow a text indentation while the header is not indented. Also I want the optional text to replace the default displayed theorem name. I couldn't do this with amsthm. I thought a solution to the problem with amsthm might contribute to a solution with ntheorem. So this doesn't help me much. Many thanks anyway. –  k.stm Jan 25 '13 at 12:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.