答案1
解决方案是tasks
使用resume
键。对于跨越一行中剩余列的项目,请使用 命令\task*
。对于跨越所有列的项目,请使用\tasks!
:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[showframe]{geometry}
\usepackage{amsmath}
\usepackage{tasks}
\settasks{counter-format =tsk[1]., label-format=\bfseries, label-offset=1em, label-width = 0.67em, item-indent = 1.67em, before-skip =0.5ex}
\begin{document}
\begin{tasks}(3)
\task* In section 1.1 we guessed solutions to the exponential growth model $d\mkern1.5mu P/d\mkern1.5mu t = k P$, where $k$ is a constant (see page 6). Using the fact that this equation is separable, derive these solutions by separating variables.\medskip
\end{tasks}
In Exercises 5–24, find the general solution of the differential equation specified. (You may not be able to reach the ideal answer of an equation with only the dependent variable on the left and only the independent variable on the right, but get as far as you can.)
\begin{tasks}[resume](3)
\task $\dfrac{dy}{dt} = ty^2$
\task $\dfrac{dy}{dt} = t^4y$
\task $\dfrac{dy}{dt} = 2y + 1$
\task $\dfrac{dy}{dt} = 2-y$
\task $\dfrac{dy}{dt} = e^{-y}$
\task $\dfrac{dy}{dt} = 1 + x^2$
\end{tasks}
\end{document}
答案2
更新:我意识到我原来的答案有一个缺陷,那就是不能引用项目的编号。这个问题在以下提案中得到了修复,该提案基于这个答案。
\documentclass{article}
\usepackage{paralist}
\usepackage{tabto}
\newcounter{problems}
\makeatletter
\def\zinparaenum{%
\ifnum\@enumdepth>\thr@@
\@toodeep
\else
\advance\@enumdepth\@ne
\edef\@enumctr{enum\romannumeral\the\@enumdepth}%
\fi
\@ifnextchar[{\@enumlabel@{\@zinparaenum@}[}{\@zinparaenum@}}
\def\@zinparaenum@{%
\usecounter{\@enumctr}%
\@namedef{p@\@enumctr}{}%
\def\@itemlabel{\csname label\@enumctr\endcsname}%
\let\@item\pl@item
\def\makelabel##1{##1}%
\ignorespaces\setcounter{enumi}{\value{problems}}}
\def\endzinparaenum{\setcounter{problems}{\value{enumi}}\ignorespacesafterend}
\makeatother
\begin{document}
\NumTabs{1}
\begin{zinparaenum}[\bf 1.]
\noindent\item How many marmots live in the Alps?
\end{zinparaenum}
\medskip
In problems \ref{first}--\ref{last} solve the differential equation\dots\\
\NumTabs{3}
\begin{zinparaenum}[\bf 1.]
\item text\label{first}
\tab\item text
\tab\item text
\tab\item text
\tab\item text
\tab\item text \label{last}
\end{zinparaenum}
\end{document}
这可能更接近你想要的。(我还将数字加粗。)在最好的世界中,我可以将两个答案结合起来,这样你就不必输入 s \tab
,但看起来我们并不是生活在最好的世界中。
原始答案:这是基于这个答案。
\documentclass{article}
\setlength{\parindent}{0mm}
\usepackage{paralist}
\usepackage{tabto}
\newcounter{problems}
\newenvironment{tabbedenum}[1]
{\NumTabs{#1}\inparaenum\let\latexitem\item
\setcounter{enumi}{\theproblems}
\def\item{\def\item{\tab\latexitem}\latexitem}}
{\setcounter{problems}{\theenumi}\endinparaenum}
\begin{document}
\begin{tabbedenum}{1}
\item How many marmots live in Switzerland?
\end{tabbedenum}
\begin{tabbedenum}{3}
\item text
\item text
\item text
\item text
\item text
\item text
\end{tabbedenum}
\end{document}