![如何列举1;2.1;2.2;3?](https://linux22.com/image/341900/%E5%A6%82%E4%BD%95%E5%88%97%E4%B8%BE1%EF%BC%9B2.1%EF%BC%9B2.2%EF%BC%9B3%EF%BC%9F.png)
代码
\documentclass{article}
\begin{document}
\begin{enumerate}
\item Initials
\item Age
\begin{enumerate}
\item Preliminary Condition
\item Support
\end{enumerate}
\item Imaging
\end{document}
输出
1
2
a)
b)
3
想要的输出:
1
2
3.1
3.2
4
答案1
\documentclass{article}
\renewcommand{\labelenumii}{\theenumii}
\renewcommand{\theenumii}{\theenumi.\arabic{enumii}.}
\setlength{\leftmarginii}{1.8ex}
\begin{document}
\begin{enumerate}
\item Initials
\item Age
\stepcounter{enumi}
\begin{enumerate}
\item Preliminary Condition
\item Support
\end{enumerate}
\item Imaging
\end{enumerate}
\end{document}
答案2
答案3
这是一个使用enumitem
:
\documentclass{article}
\usepackage{enumitem}
\setenumerate[1]{align=left,label=\arabic*}
\setenumerate[2]{before=\stepcounter{enumi},label*=.\arabic*,leftmargin=1.2em,align=left}
\begin{document}
\begin{enumerate}
\item Initials
\item Age
\begin{enumerate}
\item Preliminary Condition
\item Support
\end{enumerate}
\item Imaging
\end{enumerate}
\end{document}