10

I have used this site so many times but this time, no answer to my problem. I am creating a lab manual for my ocenaography class. I am using the \tcolorbox package to highlight my multiple choice questions. From one box to another, I would like the counter to resume (e.g., Q1, Q2, Q3...). I have tried the \enumitem package to no avail.

\documentclass{article}

\usepackage{tcolorbox} 
\usepackage[american]{babel}
\usepackage{enumitem}
\newcounter{saveenumi}

\begin{document}
\begin{tcolorbox}[fonttitle=\sffamily\bfseries\large,colback=white,colframe=blue!50!white,title=Checking In]
    \begin{enumerate}
    \item By absorbing carbon dioxide, the world ocean \underline{\hspace{2cm}} the rate at which global warming would otherwise be occurring. 

        \begin{tabular}{p{15cm}}
        (a) slows \tabularnewline
        (b) increases \tabularnewline
        (c) does not impact \tabularnewline
        \end{tabular}
\end{enumerate}
\end{tcolorbox}

But this absorption is changing the chemical state of the ocean in other ways likely to produce dire consequences, including the acidification (lowering the pH) of seawater that is already impacting marine ecosystems.

\medskip
\begin{tcolorbox}[fonttitle=\sffamily\bfseries\large,colback=white,colframe=blue!50!white,title=Checking In]
\begin{enumerate}[resume]
    \item Which reservoir stores the most carbon? 

        \begin{tabular}{p{15cm}}
        (a) surface ocean \tabularnewline
        (b) deep ocean \tabularnewline
        (c) reactive sediments \tabularnewline
        \end{tabular}
\end{enumerate}
\end{tcolorbox}
\end{document}

What I need is for the second box to start with "2. Which reservoirs stores the most carbon?" instead of what it currently reads on my PDF "1. Which reservoirs stores more carbon?"

Thanks a lot for your help.

1

1 Answer 1

7

a bare resume only works in the same local scope. To work globally you need to declare a series of enumerations:

\documentclass{article}

\usepackage{tcolorbox} 
\usepackage[american]{babel}
\usepackage{enumitem}
\newcounter{saveenumi}

\begin{document}
\begin{tcolorbox}[fonttitle=\sffamily\bfseries\large,colback=white,colframe=blue!50!white,title=Checking In]
    \begin{enumerate}[series=stuff]
    \item By absorbing carbon dioxide, the world ocean \underline{\hspace{2cm}} the rate at which global warming would otherwise be occurring. 

        \begin{tabular}{p{15cm}}
        (a) slows \tabularnewline
        (b) increases \tabularnewline
        (c) does not impact \tabularnewline
        \end{tabular}
\end{enumerate}
\end{tcolorbox}

But this absorption is changing the chemical state of the ocean in other ways likely to produce dire consequences, including the acidification (lowering the pH) of seawater that is already impacting marine ecosystems.

\medskip
\begin{tcolorbox}[fonttitle=\sffamily\bfseries\large,colback=white,colframe=blue!50!white,title=Checking In]
\begin{enumerate}[resume=stuff]
    \item Which reservoir stores the most carbon? 

        \begin{tabular}{p{15cm}}
        (a) surface ocean \tabularnewline
        (b) deep ocean \tabularnewline
        (c) reactive sediments \tabularnewline
        \end{tabular}
\end{enumerate}
\end{tcolorbox}

\end{document}
2
  • Thanks for your solution. It is a LOT more elegant than what I just found out. Jun 2, 2013 at 18:44
  • Instead of [resume=stuff] one can simply say [stuff] (although I like more the former). Jun 2, 2013 at 19:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .