4

I am trying to use the empheq package as indicated here. But I am seeing some problems with where the tags to the equations are placed, since my document also uses the ntheorem package. (Remark: the \usepackage... incantations in the MWE are the suggested ones in the empheq documentation.)

MWE:

\documentclass{minimal}
\usepackage[ntheorem]{empheq}
\usepackage[thmmarks,amsmath]{ntheorem}

\begin{document}
\begin{empheq}{equation}
a = b = c
\end{empheq}
\begin{empheq}[right=\empheqrbrace{\text{A long description}}]{equation}
a = b = c
\end{empheq}
\begin{empheq}{align}
a & = b\\
c & = d
\end{empheq}
\begin{empheq}[left={\text{yet another desc}}\empheqlbrace]{align}
a & = b\\
c & = d
\end{empheq}
\end{document}

The compiled output looks like

enter image description here

As you can see, for some reason the equation tags are offset by an amount proportional to the left and/or right emphasis inserted via the empheq environment. It seems to have to do with how ntheorem overrides the amsmath commands. If I load

\usepackage[thmmarks]{ntheorem}

instead (without the amsmath option), the alignment is okay. (But of course in my original document other things break horribly; this seems to be documented in the ntheorem documentation.)

Is this known? Are there workarounds? Or am I just not able to use the empheq package now?

Lastly, for what it is worth, here's the compile log:

~/myWork/NEW $ latex test
This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2012/dev/Debian)
 restricted \write18 enabled.
entering extended mode
(./test.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, et
hiopic, farsi, arabic, pinyin, croatian, bulgarian, ukrainian, russian, slovak,
 czech, danish, dutch, usenglishmax, ukenglish, finnish, french, basque, ngerma
n, ngerman-x-2011-07-01, german, swissgerman, german-x-2011-07-01, monogreek, g
reek, ibycus, ancientgreek, hungarian, bengali, tamil, hindi, telugu, gujarati,
 sanskrit, malayalam, kannada, assamese, marathi, oriya, panjabi, italian, lati
n, latvian, lithuanian, mongolian, mongolianlmc, nynorsk, bokmal, indonesian, e
speranto, lao, coptic, welsh, irish, interlingua, serbian, serbianc, slovenian,
 estonian, romanian, armenian, uppersorbian, afrikaans, icelandic, kurmanji, tu
rkish, polish, portuguese, galician, catalan, spanish, swedish, ukenglish, load
ed.
(/usr/share/texlive/texmf-dist/tex/latex/base/minimal.cls
Document Class: minimal 2001/05/25 Standard LaTeX minimal class
) (/usr/share/texlive/texmf-dist/tex/latex/mh/empheq.sty
(/usr/share/texlive/texmf-dist/tex/latex/mh/mhsetup.sty)
(/usr/share/texlive/texmf-dist/tex/latex/mh/mathtools.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/latex/tools/calc.sty)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty))))
(/usr/share/texlive/texmf-dist/tex/latex/ntheorem/ntheorem.sty
Style `ntheorem', Version 1.31 <2011/02/16>
(/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty)) (./test.aux)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/dvips.def))) [1] (./test.aux)
 )
Output written on test.dvi (1 page, 892 bytes).
Transcript written on test.log.
David Carlisle
  • 757,742
Willie Wong
  • 24,733
  • 8
  • 74
  • 106

1 Answers1

3

I just got a response back from Lars Madsen. Right now the root cause for the problem hasn't been solved (though he know which lines in ntheorem are the culprit), but there is a work-around (which when tested in my document works and doesn't break anything else):

After the line loading ntheorem, insert \usetagform{default}.

Willie Wong
  • 24,733
  • 8
  • 74
  • 106
  • 1
    I think that the above will become the solution. Perhaps get ntheorem to detect empheq and issue it automatically. – daleif Apr 25 '12 at 10:22