0

So I have been having issues with the enumerate command on my document.

It initially works fine until I add a margin then it does this weird thing where It completely forgets about the previous numbers and start organizing the items with numbers resulting of how many 'i' is In the word margin.

Here is an example with itemize and enumerate in the same document page.

\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}

This is how it looks:

Wrong one

If I remove the [leftmargin=3cm] from the enumerate it works fine but without a margin. This is how it looks: normal working one I'm pretty new to Latex so I don't really know how to fix it but I know it's a package error or a definition error somewhere in my document that I need to adjust.

I could use all the help I can get.

Thank you very much.

3
  • You need $\boldsymbol{d}$ to begin with. And the optional argument to \begin{enumerate} or \begin{itemize} requires \usepackage{enumitem}.
    – egreg
    Commented Feb 9, 2022 at 15:21
  • please always provide a complete small document that shows the problem, I would have guessed you were using amsmath and enumitem packages but they give error ! Missing $ inserted. on \boldsymbol as used here. Commented Feb 9, 2022 at 19:21
  • the output you show with label= in the output is the expected output if you use the enumerate package Commented Feb 9, 2022 at 19:23

1 Answer 1

2

You did not show the code causing the error but I would guess you have

\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}

which generates errors starting with

! Undefined control sequence.
\enit@endenumerate ->\enit@after 
                                 \endlist \ifx \enit@series \relax \else \if...
l.22 \end{enumerate}
                    
? 

but if you scroll past the errors produces

enter image description here

remove the enumerate package and just use enumitem here.

In general never ignore errors, the PDF is not intended to be usable after an error.

enumerate is incompatible with enumitem as they both provide an optional argument to control the lable, but enumerate does not use a key-value list but uses a "template" where i denotes roman numbers, 1 denotes arabic, etc so

enter image description here

is produced from

\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}

See

What's the difference between the enumerate and enumitem packages?

4
  • Thank you very much, I did what you told me to do and it worked. I'm very new to Latex and I'm trying my best to work with it and use it, but sometimes errors get overwhelming honestly It might not be the best course of action but with 50+ more pages to write and 42 errors showing up. I just can't follow them up to understand what's wrong and how is it affecting my document. I get the look I desire and ignore the errors, and that is wrong and I'll work on that next. Commented Feb 16, 2022 at 11:53
  • @NebrassIbrahimi the number of errors never matters, just look at and fix the first. If you choose to scroll past an error (or your editor chooses that for you) then tex tries to recover but very often it will generate multiple spurious errors as it is starting from an impossble place that is just caused by the first error. Certainly though if asking a question here, always show the error message, the PDF generated after any error is (as you see) often just nonsense as things "fall through" to the output. Commented Feb 16, 2022 at 12:18
  • I have worked Yesterday and today on the errors and I managed to take them down to 8. none of them seem critical because the color changed from red to orange( I'm using overleaf ) but I will try my best to fix them too. Commented Feb 17, 2022 at 13:15
  • check in the log overleaf does not always parse the log correctly but orange is not normally an error but a warning there is a big difference and yes some warnings it is safe to ignore. @NebrassIbrahimi Commented Feb 17, 2022 at 14:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .