我有需要更改为水平对齐的特定列表。我想过使用任务包,但不知道该怎么做。以下是列表:
\documentclass[12pt,numbers=noenddot,headings=small,parskip=half,headsepline, listof=nochaptergap, listof=totoc,index=totoc]{scrreprt}
\usepackage{xpatch}
\usepackage[a4paper, includehead, left=3.5cm, right=1.7cm, top=2.5cm, bottom=2.0cm]{geometry}
\setlength{\parindent}{0em}
\usepackage{enumitem,tasks}
\usepackage{multicol}
\begin{document}
\begin{multicols}{2}
\setlist[itemize]{wide =0pt, leftmargin=*, nosep,before=\KOMAoptions{parskip=false}}
\begin{enumerate}[topsep=0pt,itemsep=-1ex,partopsep=1ex,parsep=3.5ex,leftmargin=*]
\item Item
\begin{itemize}
\item Item
\end{itemize}
\item Item
\begin{itemize}
\item Item
\end{itemize}
\item Item
\begin{itemize}
\item Item
\item Item
\end{itemize}
\item Item
\begin{itemize}[wide=0pt]
\item Item
Intertext
\item Item
\end{itemize}
\item Item
\end{enumerate}
\end{multicols}
\end{document}
答案1
操作方法如下:
\documentclass[12pt,numbers=noenddot,headings=small,parskip=half,headsepline, listof=nochaptergap, listof=totoc,index=totoc]{scrreprt}
\usepackage{xpatch}
\usepackage[a4paper, includehead, left=3.5cm, right=1.7cm, top=2.5cm, bottom=2.0cm, showframe]{geometry}
\setlength{\parindent}{0em}
\usepackage{enumitem,tasks}
\usepackage{multicol}
\begin{document}
\setlist[itemize]{wide =0pt, leftmargin=*, nosep, before=\KOMAoptions{parskip=false}, after =\vspace*{-\baselineskip}}
\settasks{counter-format=tsk[1]. , item-indent = 1.2em, label-width =1.2em, label-offset = 0em, after-item-skip = -1ex}
\begin{tasks}(2)
\task Item
\begin{itemize}
\item Item
\end{itemize}
\task Item
\begin{itemize}
\item Item
\end{itemize}
\task Item
\begin{itemize}
\item Item
\item Item
\end{itemize}
\task Item
\begin{itemize}[wide=0pt]
\item Item
Intertext
\item Item
\end{itemize}
\task Item
\end{tasks}
\end{document}