tags:

views:

302

answers:

2

Hi, So I want to use memoir document class and the ntheorem package with the thmmarks option. When I try and compile a file like this, I get "no room for a new \count" errors. What can I do about this?

ntheorem with thmmarks option works fine in article, and ntheorem works alright in memoir as long as I don't try and use the thmmarks option...

To reformulate the question: Is there a way to, I don't know, cut out parts of the memoir class definitions that I don't use to free up some \counts for ntheorem thmmarks? Or is there a way to alter how many \counts LaTeX allows so that there are enough to share?

(I'm fully aware that insisting on using memoir for typesetting a theorem-heavy document is a little perverse, but what the heck.)

A: 

memoir wasn't really designed to be setting all that math-- hence the name memoir and as such, memoir does things in kind-of its own way, and provides much more functionality out of the box than article, report, or book. this comes at a cost though, as some packages aren't compatible with memoir... you might be better of using article, report or book. However, there is an extensive list of errors in the memoir manual. read it!

Mica
I've found the error in the memoir manual, but it doesn't tell me what I can DO about it...
Seamus
try a `\clearpage` right before the indicated line number of the error.
Mica
The line number of the error refers to the line number in ntheorem.sty or ntheorem.dtd, not in my tex file...
Seamus
then i suppose the next question is... why are you using memoir? what are you gaining from it that can't be had using a more compatible document class?
Mica
habit, lots of nice touches like neat headers and footers... I know it's not anything that can't be replicated with a bit of work in book or article, but I hoped it would be easier to fix this problem than to figure out how to reprettify my document in article.My interim solution is to revert to article, but I'd still like to fix this problem, if only out of interest, rather than out of necessity...
Seamus
+1  A: 

See the UK TeX FAQ entry about this error: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=noroom

With any modern LaTeX installation, you're going to be using eTeX. Thus, based on that FAQ entry, you should be able to fix the problem by inserting

\usepackage{etex}

immediately after your \documentclass line. If that's insufficient, try also adding the \reserveinserts{n} line suggested there with some appropriate number of additional inserts (which I guess you can find by trial and error), to reserve additional space. (A bit of Google-searching on "reserveinserts ntheorem" indicates that this is a common problem with the ntheorem package, and finds a suggestion of 10 as a reasonable value, though you may need more.)

If that works, you might also write to the Memoir class author, and suggest that he add a note to this effect in the manual.

This thread also suggests an alternate method of loading the ntheorem package that may help, if \reserveinserts doesn't do the trick: http://newsgroups.derkeiler.com/Archive/Comp/comp.text.tex/2009-03/msg00531.html

Brooks Moses