3

I am creating a document where I use numbered lists. I have two environments for my lists: the regular enumerate command (one column) and a personalized, two column enumerate command. I have no idea what the correct vocabulary is for this, very sorry, still new to Latex.

\documentclass[twoside]{article}
\usepackage{amsmath,amsfonts,amssymb,graphicx,mathtools,flexisym,tasks,enumitem,multicol,mdframed,tabularx}

%my itemized lists in two columns
\NewTasks[style=enumerate]{myitemize}[\item](2)

\begin{document}

\begin{enumerate} % this should be numbered 1, 2
\item this is in one column
\item because this problem is worked horizontally
\end{enumerate}

\begin{myitemize} % this should be numbered 3, 4 in the first row and 5, 6 in the second row, etc.
\item but these problems
\item are in two columns
\item because they are better
\item when worked vertically
\end{myitemize}

\begin{enumerate} % this should be numbered 8, 9
\item but then you have to do some writing
\item which happens horizontally
\item so we are back to one column
\end{enumerate}
\end{document}

I would like to continue the number system despite the change in format. So we should see each item numbered consecutively 1-9. What is happening, as I'm sure you know, is that the count resets each time. I have tried to use [resume] and manually change the counters, but this is not great since I frequently go back and add items to my list willy-nilly. Note: [resume] works GREAT for both the enumerate and myitemize commands! But they don't work together.

I feel like this is close: Resuming a list started within a minipage but not quite what I need since I've defined my own list making thing. I have tried using [resume*, start=5] but it doesn't seem to be working for my two column command. I am also exploring this: How to resume list numbering (enumerated lists) with multicols environments but then it is not numbering the way that I want it to be numbered (that is, it is counting down the column and not across the rows which is a problem I already panic-submitted Number problems in two columns).

Thank you in advance, and I am happy to clarify if needed.

1 Answer 1

4

The \NewTasks command is very flexible:

\documentclass[twoside]{article}
\usepackage{mathtools, amsfonts, amssymb, graphicx, flexisym, tasks, enumitem, multicol, mdframed, tabularx}

%my itemized lists in two columns by default
\NewTasks[style=enumerate]{myitemize}[\item](2)

\begin{document}

\begin{myitemize}(1)
  \item this is in one column
  \item because this problem is worked horizontally
\end{myitemize}

\begin{myitemize}[resume]%
  \item but these problems
  \item are in two columns
  \item because they are better
  \item when worked vertically
\end{myitemize}

\begin{myitemize}[resume](1)%
  \item but then you have to do some writing
  \item which happens horizontally
  \item so we are back to one column
\end{myitemize}

\end{document} 

enter image description here

0

You must log in to answer this question.

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