我有一个列表列表。如何删除内部列表的缩进,以便内部列表 1、2 和 3 与主列表 1 对齐。换句话说,每个级别的默认项目缩进是多少?
\item[] Main List 1
\begin{itemize}[nosep,leftmargin=*,labelindent=0pt]
\item[] Inner List 1
\item[] Inner List 2
\item[] Inner List 3
我认为我必须更改 leftmargin 参数,但我不知道要更改多少。看来 leftmargin=10pt 有效,但我只是猜测。
答案1
一种方法是设置leftmargin
为 0pt。
\documentclass[12pt]{article}
\usepackage{enumitem}
\begin{document}
\begin{itemize}
\item[] Main List 1
\item[] Main List 2
\begin{itemize}[nosep,leftmargin=0pt,labelindent=0pt]
\item[] Inner List 1
\item[] Inner List 2
\item[] Inner List 3
\end{itemize}
\item[] Main List 3
\end{itemize}
\end{document}
答案2
\setlist[itemize,<level>]{..}
您可以使用enumitem分别设置不同级别的缩进。
\documentclass[12pt,a4paper]{article}
\usepackage{enumitem}
\begin{document}
\setlist[itemize,2]{leftmargin=0pt}
\noindent normal text
\begin{itemize}
\item[] Main List 1
\begin{itemize}[nosep,labelindent=0pt]
\item[] Inner List 1
\item[] Inner List 2
\item[] Inner List 3
\end{itemize}
\end{itemize}
\end{document}
答案3
玩转wide
钥匙:
\documentclass{article}
\usepackage{enumitem}
\usepackage{lipsum}
\begin{document}
\lipsum[47]
\begin{itemize}[label={}]
\item Main List 1
\item Main List 2. Some text at the upper level. Some more text at the upper level. Still some more text.
\begin{itemize}[label={}, nosep, wide=0pt, itemindent = 0pt]
\item Inner List 1. Some text at the lower level. Some more text at the lower level. Still some more text. S
\item Inner List 2
\item Inner List 3
\end{itemize}
\item Main List 3
\end{itemize}
\end{document}