如果我编译以下内容:
\documentclass[]{article}
\usepackage{enumerate}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[1.]
\item This is the first
\item This is the second
\end{enumerate}
\end{document}
我收到错误信息:
Package enumitem Error: 1. undefined.
但如果我编译以下内容:
\documentclass[]{article}
\usepackage{enumerate}
% \usepackage{enumitem}
\begin{document}
\begin{enumerate}[1.]
\item This is the first
\item This is the second
\end{enumerate}
\end{document}
运行正常。加载时我遗漏了什么enumitem
?
答案1
您需要使用该shortlabels
选项来兼容enumerate
标签的 -like 方案:
\documentclass[]{article}
\usepackage{enumerate}
\usepackage[shortlabels]{enumitem}
\begin{document}
\begin{enumerate}[1.]
\item This is the first
\item This is the second
\end{enumerate}
\end{document}
但我建议仅使用enumitem
以下shortlabels
选项加载:
\documentclass[]{article}
\usepackage[shortlabels]{enumitem}
\begin{document}
\begin{enumerate}[1.]
\item This is the first
\item This is the second
\end{enumerate}
\end{document}