7
\documentclass[14pt]{extarticle}
\usepackage{lineno}
\linenumbers
\usepackage[utf8]{inputenc} 
\usepackage{lipsum}
\usepackage{enumitem}
\usepackage{enumerate}
\usepackage{sectsty}
\usepackage{titlesec}
\titleformat*{\section}{\Large\bfseries}
\sectionfont{\fontsize{}{15}\selectfont}
\setlist[enumerate]{itemsep=0mm}
\usepackage[danish]{babel}
\begin{document}
\author{TEXT}
\title{TEXT}

\maketitle
    \section*{TEXT}
\begin{enumerate}[{1.}1]
    \item \textbf{TEXT}
    \begin{enumerate}[{1.1.}1]
        \item TEXT
        \item TEXT
        \item TEXT
        \item TEXT
        \begin{itemize}
            \item TEXT
            \item TEXT
            \item TEXT
        \end{itemize}
        \item TEXT
    \end{enumerate}
        \item \textbf{TEXT}
                \begin{enumerate}[{1.2.}1]
                    \item TEXT
                \end{enumerate}
        \item \textbf{TEXT}
                \begin{enumerate}[{1.3.}1]
                    \item TEXT
                \end{enumerate}
\end{enumerate}

Hi I have this text writen but TeXstudio Gives me the following errors:

- Undefined control sequence. \end{enumerate} OR
- Missing number, treated as zero. \end{enumerate} for the lines with the \end{enumerate} code
- Package sectsty Error: The sectsty package doesn't work with(sectsty) this document class. scrartcl, scrbook, and scrreprt.}
4
  • Welcome to TeX.SX! Don't load both enumitem and enumerate. You're using the syntax of the latter, so remove \usepackage{enumitem}. However, this package is much more powerful, so you may want to switch. – egreg Mar 17 '15 at 16:37
  • Also, package sectsty throws a pretty clear error. – Johannes_B Mar 17 '15 at 16:38
  • @Johannes_B Well, extarticle is based on article, so sectsty ought to work. But loading it alongside with titlesec is not a good idea either. – egreg Mar 17 '15 at 16:43
  • @egreg Yes, still, the error is annoying ;-) – Johannes_B Mar 17 '15 at 16:44
6

You shouldn't mix the use of enumitem and enumerate since their interfaces differ and are conflicting.

Perhaps you're after this type of layout:

enter image description here

\documentclass{extarticle}
\usepackage{enumitem}
\setlist[enumerate]{itemsep=0mm}
\begin{document}

\section{TEXT}

\begin{enumerate}[label=\thesection.\arabic*]
  \item \textbf{TEXT}
  \begin{enumerate}[label*=.\arabic*]
    \item TEXT
    \item TEXT
    \item TEXT
    \item TEXT
    \begin{itemize}
      \item TEXT
      \item TEXT
      \item TEXT
    \end{itemize}
    \item TEXT
  \end{enumerate}
  \item \textbf{TEXT}
  \begin{enumerate}[label*=.\arabic*]
    \item TEXT
  \end{enumerate}
  \item \textbf{TEXT}
  \begin{enumerate}[label*=.\arabic*]
    \item TEXT
  \end{enumerate}
\end{enumerate}

\end{document}

The label* key uses the higher level label as part of its label.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.