I am facing a strange problem while using the enumitem
and answers
packages. The following code compiles with no errors.
\documentclass{article}
\usepackage{enumitem}
\usepackage{answers}
\Newassociation{sol}{Solution}{ans}
\newlist{question}{enumerate}{1}
\setlist[question,1]{label=\arabic*}
\begin{document}
\Opensolutionfile{ans}
\section{Problems}
\begin{question}
\item Question 1 \begin{sol}Solution 1\end{sol}
\end{question}
\Closesolutionfile{ans}
\section{Solutions}
\input{ans}
\end{document}
However, whenever I try to style the label in the list, answers
throws a TeX capacity exceeded, sorry
error.
\documentclass{article}
\usepackage{enumitem}
\usepackage{answers}
\Newassociation{sol}{Solution}{ans}
\newlist{question}{enumerate}{1}
\setlist[question,1]{label=\textbf{\arabic*}}
\begin{document}
\Opensolutionfile{ans}
\section{Problems}
\begin{question}
\item Question 1 \begin{sol}Solution 1\end{sol}
\end{question}
\Closesolutionfile{ans}
\section{Solutions}
\input{ans}
\end{document}
Surely there must be a way to use these packages together?