TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following in my preamble:

\usepackage[overload, ntheorem]{empheq}
\usepackage[amsmath, thmmarks]{ntheorem}

Further, I also have


So now I can make an empty environment which takes an optional argument like \begin{optional}[$H_2$]. This works but I get to see (H_2) while I would like to see [H_2]. How do I change this? It would be perfect if I could access the mathtools command that gives me the left bracket and the right bracket so I don't have to change it in multiple places if I would want to change it (I could of course define a new command for the left and right bracket but that feels like an ugly hack!).

I forgot to mention that if I give it a label, then refering to it should give the optional argument. Maybe there is a better solution to this problem. I have also tried an equation with \tag but \text doesn't do automatic line breaks.

Thanks for the suggestion. I fixed it like this, but I don't know if it is a good way:

  \par\noindent \text{[#1]}
share|improve this question
up vote 4 down vote accepted

Might be a better idea if you provide a full minimal example, for those not knowing it is not obvious that you a using ntheorem. As for you question. You will need to define an alternative theoremstyle, as the braces are hardwired inside it.

Here is the default for nonumberplain

  {\item[\theorem@headerfont\hskip\labelsep ##1\theorem@separator]}%
  {\item[\theorem@headerfont\hskip \labelsep ##1\ (##3)\theorem@separator]}

to make it work you will need something like

 {\item[\theorem@headerfont\hskip\labelsep ##1\theorem@separator]}%
 {\item[\theorem@headerfont\hskip \labelsep ##1\ {[##3]}\theorem@separator]}

(since we are already inside a pair of []'s we need to protect it with a pair of {}'s)

For your second question:


you can use \tagform@ inside the mynonumberplain definition, but it has to come after the \usetagform{brackets}. The xxx is just to get rid of the @

As for the last question

 {\item[\theorem@headerfont\hskip\labelsep ##1\theorem@separator]}%
 {\item[\theorem@headerfont\hskip \labelsep ##1\ {[##3]}\theorem@separator]

the trick here is that we need the \@currentlabel outside the \item[...], because it forms a local group, and thus would never get outside, unless we make it global, and that might not be a good idea.

share|improve this answer
I have added that I use ntheorem. Do you have a suggestion for my other comments? The label and using the brackets as I defined them using mathtools. – Jonas Teuwen Apr 18 '11 at 8:35
@Jonas: was this better? – daleif Apr 18 '11 at 12:47
Yes, I'm thinking about it how I can use your suggestions. About the label I think I need to do something like \def\@currentlabel{#1} where #1 refers to the optional argument. I wonder if I can do that using ntheorem. – Jonas Teuwen Apr 18 '11 at 13:30
@jonas: you can but you need to be a bit devious, see my edit. – daleif Apr 18 '11 at 22:09

Your Answer


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.