When I try to add a figure that consists of two subfigures to my document with the following piece of code
\begin{figure}[h]
\centering
\subfloat[Locally confluent]{
\begin{tikzpicture}[>=stealth,font=\sffamily]
\node (X) at (0,0) {$x$};
\node (Y) [below left=2cm and 1cm of X] {$y$};% 2cm below, 1cm to the left (optional)
\node (Z) [below right=2cm and 1cm of X] {$z$};
\node (U) [below left=2cm and 1cm of Z] {$u$};
\draw [semithick,->] (X) -- (Y);
\draw [semithick,->] (X) -- (Z);
\draw [semithick,->] (Y) -- (U) node [midway,below,sloped] {*};
\draw [semithick,->] (Z) -- (U) node [midway,below,sloped] {*};
\end{tikzpicture}
\label{fig:locallyconfluent}}
\qquad
\subfloat[Confluent]{
\begin{tikzpicture}[>=stealth,font=\sffamily]
\node (X) at (0,0) {$x$};
\node (Y) [below left=2cm and 1cm of X] {$y$};% 2cm below, 1cm to the left (optional)
\node (Z) [below right=2cm and 1cm of X] {$z$};
\node (U) [below left=2cm and 1cm of Z] {$u$};
\draw [semithick,->] (X) -- (Y) node [midway,above,sloped] {*};
\draw [semithick,->] (X) -- (Z) node [midway,above,sloped] {*};
\draw [semithick,->] (Y) -- (U) node [midway,below,sloped] {*};
\draw [semithick,->] (Z) -- (U) node [midway,below,sloped] {*};
\end{tikzpicture}
\label{fig:confluent}}
\caption{This is a figure containing several subfigures.}
\end{figure}
I get "no room for new \count" errors in my ntheorem.tex file where I include all ntheorem stuff and define all my theorems.
Am I doing something wrong or why is this happening?
ntheorem.tex
file? This should have no relation with the graphics you're showing, but is probably due to the packages you're loading. Put\usepackage{etex}
as the first package, just after the\documentclass
line.etex
package enables the usage of the extended pool of registers. Don't use thesubfigure
package. However, the error might be due to some programming error and the complete preamble is needed to diagnose it.