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.

Im using the packages ntheorem and framed to create boxes like 1. ntheorem Does anyone know how to change the heading to the following order:

name. counter: parameter

For example: Erg. 2: Erwerbshierarchie regspr. Vnt. der Bezugsphoneme

My actual settings are:

\usepackage{framed}
\usepackage[hyperref, amsmath, amsthm, framed, thmmarks]{ntheorem}

\theoremstyle{break}
\theoremheaderfont{\normalfont\smallskip\scriptsize\bfseries}
\theorembodyfont{\normalfont\scriptsize}
\theoremindent0.5cm
\newframedtheorem{erg}{Erg.}
share|improve this question
1  
While code snippets are useful in explanations, it is always best to compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. –  Peter Grill Nov 25 '11 at 17:47

1 Answer 1

up vote 6 down vote accepted

The braces are actually hardcoded in the definition of the break style, so the definition needs to be changed.

\documentclass{article}

\usepackage{amsmath}
\usepackage{framed}
\usepackage[hyperref, amsmath, amsthm, framed, thmmarks]{ntheorem}

\makeatletter
\renewtheoremstyle{break}%
  {\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont
          ##1\ ##2\theorem@separator}\hbox{\strut}}}]}%
  {\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont
%           ##1\ ##2\ (##3)\theorem@separator}\hbox{\strut}}}]}% DELETED
          ##1\ ##2:\ ##3\theorem@separator}\hbox{\strut}}}]}% NEW
\makeatother

\theoremstyle{break}
\theoremheaderfont{\normalfont\smallskip\scriptsize\bfseries}
\theorembodyfont{\normalfont\scriptsize}
\theoremindent0.5cm
\newframedtheorem{erg}{Erg.}

\begin{document}

\begin{erg}[Description]
Some text.
\end{erg}

\end{document}

enter image description here

share|improve this answer
    
Wow! Thanks a lot :-) –  MaKa TaBo Nov 25 '11 at 17:57
1  
If you want to keep the original break style,then you could define this as your own style using \newtheoremstyle{mystyle} and then use \theoremstyle{mystyle} in the definition of erg –  cmhughes Nov 25 '11 at 20:43
    
lockstep, do you know how to shrink the inner space between the textparts and the border? Furthermore, is there some option to widen the space leftside and rightside out of the border? –  MaKa TaBo Nov 26 '11 at 14:30
    
Sorry, I'm not familiar with the intricacies of framed boxes. However, have a look at the mdframed package. –  lockstep Nov 26 '11 at 14:33

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.