所以我的文档中的枚举命令一直在遇到问题。
它最初工作正常,直到我添加边距,它才发生一件奇怪的事情,它完全忘记了之前的数字,并开始用数字来组织项目,结果就是单词边距中有多少个“i”。
下面是在同一个文档页面中使用 itemize 和 enumerate 的示例。
\noindent The following four transformation parameters are known as the DH parameters:
\begin{itemize}[leftmargin=3cm]
\item \boldsymbol{d}: offset along previous $z$ to the common normal
\item \boldsymbol{\theta}: angle about previous $z$, from old $x$ to new $x$.
\item \boldsymbol{r}: length of the common normal (aka $a$, but if using this notation, do not confuse with $\alpha$ ). Assuming a revolute joint, this is the radius about previous $z$.
\item \boldsymbol{\alpha} : angle about common normal, from old z axis to new $z$ axis.
\end{itemize}\newline
In summary, the reference frames are laid out as follows:
\begin{enumerate}[leftmargin=3cm]
\item the $z$-axis is in the direction of the joint axis.
\item the $x$-axis is parallel to the common normal: $x_{n}=z_{n}\times z_{n-1}$ (or away from zn-1)
If there is no unique common normal (parallel $z$ axes), then $d$ (below) is a free parameter. The direction of $x_{n}$ is from $z_{{n-1}}$ to $z_{n}$, as shown in the video below.
\item the $y$-axis follows from the $x$- and $z$-axis by choosing it to be a right-handed coordinate system.
\end{enumerate}
它看起来是这样的:
如果我从枚举中删除 [leftmargin=3cm],它会正常工作,但没有边距。它看起来是这样的: 我对 Latex 还很陌生,所以我真的不知道如何修复它,但我知道这是我的文档中某处的包错误或定义错误,我需要进行调整。
我可以利用所有我能得到的帮助。
非常感谢。
答案1
你没有显示导致错误的代码,但我猜你已经
\documentclass{article}
\usepackage{amsmath}
\usepackage{enumitem}
\usepackage{enumerate}
\begin{document}
\noindent The following four transformation parameters are known as the DH parameters:
\begin{itemize}[leftmargin=3cm]
\item $\boldsymbol{d}$: offset along previous $z$ to the common normal
\item $\boldsymbol{\theta}$: angle about previous $z$, from old $x$ to new $x$.
\item $\boldsymbol{r}$: length of the common normal (aka $a$, but if using this notation, do not confuse with $\alpha$ ). Assuming a revolute joint, this is the radius about previous $z$.
\item $\boldsymbol{\alpha}$ : angle about common normal, from old z axis to new $z$ axis.
\end{itemize}%no!!\newline
In summary, the reference frames are laid out as follows:
\begin{enumerate}[leftmargin=3cm]
\item the $z$-axis is in the direction of the joint axis.
\item the $x$-axis is parallel to the common normal: $x_{n}=z_{n}\times z_{n-1}$ (or away from zn-1)
If there is no unique common normal (parallel $z$ axes), then $d$ (below) is a free parameter. The direction of $x_{n}$ is from $z_{{n-1}}$ to $z_{n}$, as shown in the video below.
\item the $y$-axis follows from the $x$- and $z$-axis by choosing it to be a right-handed coordinate system.
\end{enumerate}
\end{document}
会产生以下错误
! Undefined control sequence.
\enit@endenumerate ->\enit@after
\endlist \ifx \enit@series \relax \else \if...
l.22 \end{enumerate}
?
但如果你滚动过去产生的错误
删除enumerate
包并在这里使用enumitem
。
一般来说,不要忽略错误,出现错误后 PDF 将无法使用。
enumerate
与之不兼容,enumitem
因为它们都提供了一个可选参数来控制标签,但enumerate
不使用键值列表,而是使用“模板”,其中i
表示罗马数字,1
表示阿拉伯语等,所以
产自
\documentclass{article}
\usepackage{amsmath}
\usepackage{enumerate}
\begin{document}
\noindent The following four transformation parameters are known as the DH parameters:
\begin{itemize}
\item $\boldsymbol{d}$: offset along previous $z$ to the common normal
\item $\boldsymbol{\theta}$: angle about previous $z$, from old $x$ to new $x$.
\item $\boldsymbol{r}$: length of the common normal (aka $a$, but if using this notation, do not confuse with $\alpha$ ). Assuming a revolute joint, this is the radius about previous $z$.
\item $\boldsymbol{\alpha}$ : angle about common normal, from old z axis to new $z$ axis.
\end{itemize}%no!!\newline
In summary, the reference frames are laid out as follows:
\begin{enumerate}[\bfseries i)]
\item the $z$-axis is in the direction of the joint axis.
\item the $x$-axis is parallel to the common normal: $x_{n}=z_{n}\times z_{n-1}$ (or away from zn-1)
If there is no unique common normal (parallel $z$ axes), then $d$ (below) is a free parameter. The direction of $x_{n}$ is from $z_{{n-1}}$ to $z_{n}$, as shown in the video below.
\item the $y$-axis follows from the $x$- and $z$-axis by choosing it to be a right-handed coordinate system.
\end{enumerate}
\end{document}
看