我想在文档中进行数学练习,以便问题按如下方式编号:
1. Question 1
a) subquestion 1 b) subquestion 2 c)subquestion 3
d) subquestion 4 e) subquestion 5 f)subquestion 6
etc.
2. Question 2
我已经设法使用该multicols
包实现了类似的效果,但这会以垂直顺序呈现字母,而不是水平顺序。我尝试的代码详述如下:
\documentclass{report}
\usepackage{multicol,amsmath,amsfonts}
\begin{document}
\subsubsection*{Exercise 18.1}
\begin{enumerate}
\item Prove the following by induction on $n$, where $n\in\mathbb Z^+$.
\begin{enumerate}
\begin{multicols}{2}
\item $\displaystyle\sum_{r=0}^n 2^r=2^{n+1}-1$
\item $5+5^2+\cdots+5^n=\displaystyle\frac{5(5^n-1)}{4}$
\item $\displaystyle\sum_{r=0}^n a^r=\frac{a(a^n-1)}{a-1};~a\in\mathbb R$\\
\item The sum of the first $n$ odd numbers is $n^2$.
\end{multicols}
\item $\displaystyle(1+a)+2(2+a)+3(3+a)+\cdots+n(n+a)=\frac{n}{6}(n+1)(3a+2n+1);~a\in\mathbb R$
\item $5(4)+6(5)+7(6)+\cdots+n(n-1)=\displaystyle\frac{1}{3}(n^3-n-60);~\forall n\geq 5$
\item $1^4+2^4+3^4+\cdots+n^4=\displaystyle\frac{n}{30}(n+1)(2n+1)(3n^2+3n-1)$
\end{enumerate}
\item Prove the following statements by induction.
\begin{enumerate}
\begin{multicols}{2}
\item $\displaystyle\sum_{r=1}^n r^5=\frac{n^2}{12}(n+1)^2(2n^2+2n-1)$
\item $\displaystyle\sum_{r=1}^n \frac{1}{r(r+1)}=\frac{r}{r+1}$
\item $\displaystyle\prod_{r=1}^n r^{12}=(r!)^{12}$
\end{multicols}
\end{enumerate}
\end{enumerate}
\end{document}
答案1
该tasks
软件包就是为此而制作的。我添加了enumitem
,以便轻松自定义enumerate
环境(wide
选项)。此外,我在环境everymath{\displaystyle}
开头使用 简化了您的代码enumerate
。可以使用 键轻松自定义标签counter-format
。最后,同样重要的是,如果某个项目长于一列,则将其键入为\parbox
。或者,您可以使用 的星号版本让它扩展到多列\tasks
:
\documentclass{report}
\usepackage{multicol,amsmath,amsfonts}
\usepackage{enumitem}
\usepackage{tasks}
\begin{document}
\subsubsection*{Exercise 18.1}
\begin{enumerate}[wide = 0pt]\everymath{\displaystyle}
\item Prove the following by induction on $n$, where $n\in\mathbb Z^+$.
\begin{tasks}(2)
\task $\sum_{r=0}^n 2^r=2^{n+1}-1$
\task $5+5^2+\cdots+5^n=\frac{5(5^n-1)}{4}$
\task $\sum_{r=0}^n a^r=\frac{a(a^n-1)}{a-1};~a\in\mathbb R$\\
\task The sum of the first $n$ odd numbers is $n^2$.
\task* $(1+a)+2(2+a)+3(3+a)+\cdots+n(n+a)=\frac{n}{6}(n+1)(3a+2n+1);~a\in\mathbb R$
\task* $5(4)+6(5)+7(6)+\cdots+n(n-1)=\frac{1}{3}(n^3-n-60);~\forall n\geq 5$
\task* $1^4+2^4+3^4+\cdots+n^4=\frac{n}{30}(n+1)(2n+1)(3n^2+3n-1)$
\end{tasks}
\item Prove the following statements by induction.
\begin{tasks}[counter-format={\bfseries tsk[1].}](2)
\task $\sum_{r=1}^n r^5=\frac{n^2}{12}(n+1)^2(2n^2+2n-1)$
\task $\sum_{r=1}^n \frac{1}{r(r+1)}=\frac{r}{r+1}$
\task $\prod_{r=1}^n r^{12}=(r!)^{12}$
\end{tasks}
\end{enumerate}
\end{document}