I may have figured out a way around the resume option not working within the newenvironment. I'm trying to make a survey, and created a new environment to quickly create survey questions and answers. I at first was running into similar problems with resume option and \newenvironment.
Code: Select all
\documentclass{article}
\usepackage{enumitem}
\usepackage{amssymb}
\newlist{questions}{enumerate}{1}
\setlist[questions]{resume, label=\bf\arabic*.}
\newenvironment{question}[1]
{\begin{questions}%[resume, label=\bf\arabic*.]
\item \textbf{#1} % #1 variable is the survey question
\begin{itemize}\renewcommand{\labelitemi}{\large $\square$}}
% all \item in the question environment will be the answer options.
{ \end{itemize}
\end{questions}}
\begin{document}
% DOES NOT RESUME
\begin{question}{Question environment correct?}
\item Yes
\item No
\end{question}
\begin{question}{Is the numbering resuming?}
\item Yes
\item No
\end{question}
% RESUMES
\renewcommand{\labelitemi}{\large $\square$}
\begin{enumerate}[resume]
\item Question 1
\begin{itemize}
\item Yes
\item No
\end{itemize}
\end{enumerate}
\begin{enumerate}[resume]
\item Question 2
\end{enumerate}
\end{document}
First I tried just using enumerate within the newenvironment instead of defining the new list, but after reading this thread I figured I'd try defining the newlist and setting the resume option before the newenvironment, but that also did not work.
I was about to just post the above code and give up for awhile, but instead I tried defining my own counter to use within the newenvironment and got a resume-like ability. I'm not sure if it would solve the OP's problem (its over a year old anyways), but maybe it will help others trying to use resume in newenvironment.
Code: Select all
\documentclass{article}
\usepackage{enumitem}
\usepackage{amssymb}
\newcounter{qstn}
\newenvironment{question}[1]
{\begin{itemize}
\addtocounter{qstn}{1}
\item[\bf\arabic{qstn}.] \textbf{#1} % #1 variable is the survey question
\begin{itemize}\renewcommand{\labelitemii}{\large $\square$}}
% all \item in the question environment will be the answer options.
{ \end{itemize}
\end{itemize}}
\begin{document}
\begin{question}{Question environment correct?}
\item Yes
\item No
\end{question}
\begin{question}{Is the numbering resuming?}
\item Yes
\item No
\end{question}
\end{document}