我一直multicol
在练习列表中使用。但我正在尝试更改列的布局。而不是
a) xxx d) xxx g) xxx
b) xxx e) xxx h) xxx
c) xxx f) xxx i) xxx
例如,我想
a) xxx b) xxx c) xxx
d) xxx e) xxx f) xxx
g) xxx h) xxx i) xxx
它可以与我的特定命令一起使用吗?
后来,我尝试使用使用多列水平枚举但我相信这个问题不同,我不知道如何改变它。
这是一个最小的工作示例。
\documentclass[a4paper,brazil, 12pt]{report}%{\article}
\usepackage[margin=1.5cm]{geometry}
\usepackage{amsmath,amsfonts,amscd,bezier}
\usepackage{amssymb}
\usepackage{babel}
\usepackage[latin1]{inputenc}
\usepackage{graphicx}
%\usepackage[dvips]{graphicx}
\usepackage{color}
\usepackage[shortlabels]{enumitem}
\usepackage{multicol}
\usepackage{tasks}
\usepackage{hyperref}
\newcommand{\dis}{\displaystyle}
\newcounter{theeq} \setcounter{theeq}{0}
\newcommand{\eq}{
\
\noindent
\refstepcounter{theeq}\textbf{\arabic{theeq}}. }
\begin{document}
\eq Calcule
\begin{multicols}{3}
\begin{enumerate}[$(a)$, leftmargin=3.2em]
\item $\dis \int (\sqrt{x^3}+ \sqrt[3]{x^2}) \;dx$
\item $\dis \int\, \dfrac{x^9 + 4x^3 -6x^2 + 3}{x^5}\ dx $
\item $\dis \int\, \dfrac{1+x}{1+x^2}\;dx $
\item $\int x\sqrt{1-x^2}\;dx$
\item $\int x^2 \;dx$
\item $\int \cos(x)\;dx$
\end{enumerate}
\end{multicols}
Is it possible like bellow?
\setcounter{theeq}{0}
\eq Calcule
\begin{multicols}{3}
\begin{enumerate}[$(a)$, leftmargin=3.2em]
\item $\dis \int (\sqrt{x^3}+ \sqrt[3]{x^2}) \;dx$
\item $\dis \int\, \dfrac{x^9 + 4x^3 -6x^2 + 3}{x^5}\ dx $
\item $\dis \int\, \dfrac{1+x}{1+x^2}\;dx $
\end{enumerate}
\end{multicols}
\begin{multicols}{3}
\begin{enumerate}[, leftmargin=3.2em]
\item[$(d)$] $\int x\sqrt{1-x^2}\;dx$
\item[$(e)$] $\int x^2 \;dx$
\item[$(f)$] $\int \cos(x)\;dx$
\end{enumerate}
\end{multicols}
\end{document}
答案1
有很多方法可以做这种事。只是为了说明这一点......
\documentclass[a4paper,brazil, 12pt]{report}%{\article}
\usepackage[margin=1.5cm, showframe]{geometry}% added showframe for demonstration
\usepackage{amsmath,amsfonts,amscd,bezier}
\usepackage{amssymb}
\usepackage{babel}
\usepackage[latin1]{inputenc}
\usepackage{graphicx}
%\usepackage[dvips]{graphicx}
\usepackage{color}
%\usepackage[shortlabels]{enumitem}
\usepackage{multicol}
\usepackage{tasks}
\usepackage{hyperref}
\newcommand{\dis}{\displaystyle}
\newcounter{theeq} \setcounter{theeq}{0}
\newcommand{\eq}{\par\refstepcounter{theeq}\textbf{\arabic{theeq}}.~}
\newcounter{block}[theeq]% auto-reset
\newcommand{\block}[1]{% #1 = equation to solve (math mode)
\refstepcounter{block}% assuming you might want to use \label inside #1
\makebox[\labelwidth][r]{(\alph{block})\hspace{\labelsep}}% \labelwidth and \labelsep are used by \item
\makebox[\dimexpr \textwidth/3-\leftskip/3-\labelwidth][l]{$\displaystyle #1$}%
\allowbreak\ignorespaces}
\newenvironment{myindent}{\parindent=0pt
\par
\raggedright% for roundoff errors
\leftskip=3.2em}{\par}
\begin{document}
\eq Calcule
\begin{myindent}
\block{\int (\sqrt{x^3}+ \sqrt[3]{x^2}) \;dx}%
\block{\int\, \dfrac{x^9 + 4x^3 -6x^2 + 3}{x^5}\ dx}%
\block{\int\, \dfrac{1+x}{1+x^2}\;dx }%
\block{\int x\sqrt{1-x^2}\;dx}
\block{\int x^2 \;dx}
\block{\int \cos(x)\;dx}
\end{myindent}
\end{document}
答案2
我找到了我想要的问题的解决方案。如果有人想知道我怎么做的,请关注代码。
感谢您的时间(对于给您带来的不便,我深表歉意)。
\documentclass[a4paper,brazil, 12pt]{report}%{\article}
\usepackage[margin=1.5cm]{geometry}
\usepackage{amsmath,amsfonts,amscd,bezier}
\usepackage{amssymb}
\usepackage{babel}
\usepackage[latin1]{inputenc}
\usepackage{graphicx}
%\usepackage[dvips]{graphicx}
\usepackage{color}
\usepackage[shortlabels]{enumitem}
\usepackage{multicol}
\usepackage{tasks}
\usepackage{hyperref}
\everymath{\displaystyle}
\newcounter{theeq} \setcounter{theeq}{0}
\newcommand{\eq}{
\
\noindent
\refstepcounter{theeq}\textbf{\arabic{theeq}}. }
\begin{document}
\eq Calcule
\begin{multicols}{3}
\begin{enumerate}[$(a)$, leftmargin=3.2em]\everymath{\displaystyle}
\item $ \int (\sqrt{x^3}+ \sqrt[3]{x^2}) \;dx$
\item $ \int\, \dfrac{x^9 + 4x^3 -6x^2 + 3}{x^5}\ dx $
\item $ \int\, \dfrac{1+x}{1+x^2}\;dx $
\item $ \int x^2\sqrt{1-x}\;dx$
\item $\int x^2 \;dx$
\item $\int \cos(x)\;dx$
\end{enumerate}
\end{multicols}
\setcounter{theeq}{0}
\eq Calcule
\begin{tasks}[counter-format=$(tsk[a])$,item-indent=3.5em, label-offset=1.00em, ](3)%
\task $ \int (\sqrt{x^3}+ \sqrt[3]{x^2}) \;dx$
\task $ \int\, \dfrac{x^9 + 4x^3 -6x^2 + 3}{x^5}\ dx $
\task $ \int\, \dfrac{1+x}{1+x^2}\;dx $
\task \label{eqd} $ \int x^2\sqrt{1-x}\;dx$
\task $\int x^2 \;dx$
\task $\int \cos(x)\;dx$
\end{tasks}
(Hint: In \ref{eqd} use that $u = 1-x$)
\end{document}