Document Classesthe packages empheq and ntheorem

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
warrence
Posts: 16
Joined: Mon May 05, 2008 10:43 pm

the packages empheq and ntheorem

Post by warrence »

hi community!

i'm currently trying to get empheq and ntheorem to work together, but somehow i cannot achieve it.
translating the following document

Code: Select all

\documentclass{book}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman, english]{babel}
\usepackage{array, paralist}
\usepackage[pdftex]{geometry}
\usepackage{amsmath, amssymb}
\usepackage{multicol, multirow}
\usepackage{ulem}
\usepackage{makeidx}
\usepackage[ngerman, english]{varioref}
\usepackage{bbm, stmaryrd}
\usepackage{calc}
\usepackage{ifthen}
\usepackage{wrapfig, picins}
\usepackage{marginnote}
\usepackage{color}
\usepackage{framed}
\usepackage{empheq}
\usepackage[bookmarksopen, colorlinks=false, pdfpagemode=UseNone, pdfstartview=Fit]{hyperref}
\usepackage[framed, hyperref, thmmarks, amsmath, thref]{ntheorem}

\begin{document}

\begin{empheq}[left=\empheqlbrace,right=\empheqrbrace]{align}
E&=mc^2\\
Y&=\sum_{n=1}^\infty\frac{1}{n^2}
\end{empheq}

\end{document}
raises the following error:

Code: Select all

! Undefined control sequence.
\TagsPlusEndmarks ...e \iftag@ \SetTagPlusEndMark 
                                                  \else \SetOnlyEndMark \fi ...
l.29 \end{empheq}
If i remove

Code: Select all

\usepackage[framed, hyperref, thmmarks, amsmath, thref]{ntheorem}
it works.

any ideas about how to fix this would be appreciated! thanks in advance,

Stefan

Recommended reading 2024:

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

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

balf
Posts: 158
Joined: Sat Jan 12, 2008 1:11 am

Re: the packages empheq and ntheorem

Post by balf »

Perhaps it is a matter of the order for loading the packages. Try loading empheq after ntheorem.

B.A.
warrence
Posts: 16
Joined: Mon May 05, 2008 10:43 pm

Re: the packages empheq and ntheorem

Post by warrence »

sorry, i did not mention that i already tried this...
balf
Posts: 158
Joined: Sat Jan 12, 2008 1:11 am

Re: the packages empheq and ntheorem

Post by balf »

Maybe there is a conlict with one of the options of ntheorem. Also, the doc of empheq says there maybe problems with hyperref, as both redefine LaTeX mechanism for labels, although empheq tries hard to be compatible, the author says . You could try to ask for help from him after you've circumscribed the problem. He's very responsive.

B.A.
warrence
Posts: 16
Joined: Mon May 05, 2008 10:43 pm

the packages empheq and ntheorem

Post by warrence »

i found out how to fix it, kind of sick...
i already tried to call ntheorem with

Code: Select all

\usepackage[framed, hyperref, thmmarks, amsmath, thref, empheq]{ntheorem}
causing latex to tell me that "empheq" is an unknown option, but to produce a different error...
what actually is working and what i did not try is to call empheq by

Code: Select all

\usepackage[ntheorem]{empheq}
this is a known bug of ntheorem, by the way.
thanks anyway, i would not have looked up the list of contributors of empheq by myself, where this is written... ;)

Stefan

Edit: now the test case works, but my "working document" still produces errors, to be exact:
! Missing \endcsname inserted.
<to be read again>
\csname\endcsname
l.580 \end{empheq}
this problem seems to be caused by the document option "fleqn" used in the main document. using

Code: Select all

\documentclass[11pt, twoside]{scrartcl}
instead of

Code: Select all

\documentclass[11pt, twoside, fleqn]{scrartcl}
works. now the question is how to use both, fleqn and empheq...
loading empheq with

Code: Select all

\usepackage[ntheorem, fleqn]{empheq}
does not work as well...

thanks in advance,
Stefan :)
Post Reply