2

I'm writing a research project using the abntex2 class, which was built over memoir.

Everything was fine until I found out that lists (itemize, description, enumerate) weren't working anymore...

I've done a lot of trial and error to find out what's wrong but I can't find anything wrong. This is the minimal example that produces the errors: ([edit] the original example I posted wasn't minimal, thanks for the correction)

\documentclass[
12pt,% tamanho da fonte
twoside,% para impressão em frente e verso
a4paper,% tamanho do papel
]{abntex2}
\usepackage{paralist}% listas no parágrafo
\usepackage[utf8]{inputenc}% seleção do encoding do texto de input

\begin{document}
 \begin{itemize}
  \item Há três bolas nesta urna, uma azul, uma vermelha, e uma verde.
   \item Uma bola está prestes a ser tirada da urna por um homem     vendado.
 \end{itemize}
\end{document}

Some of the text is in portuguese, but I don't think it's anything important to solve the issue.

That's what I get when I try to compile:

error

My OS is Linux Mint 17 and I'm using Kile 2.1.3 to typeset the document. I'm using BibTex with JabRef for the bibliography.

jarauh
  • 2,762
  • 15
  • 27
  • 1
    Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. It is not necessary to start your question with a greeting. Also, your example is definitely not minimal. Try to remove some of the packages that you load (amsmath, amsfonts) and some of the options (e.g. does the problem only occur when you load both english and brazil language support?). – jarauh Oct 25 '15 at 02:09
  • That is not very minimal... ! – cfr Oct 25 '15 at 02:18
  • I thought I should include every package I need, not only the ones that produce the error. I'll try to get more acquainted with the minimal example standards! – Daniel Diniz Oct 25 '15 at 02:26

2 Answers2

3

Here's a minimal example which reproduces the problem:

\documentclass[
12pt,% tamanho da fonte
twoside,% para impressão em frente e verso
a4paper,% tamanho do papel
]{abntex2}
\usepackage{paralist}% listas no parágrafo

\begin{document}
\begin{itemize}
 \item Há três bolas nesta urna, uma azul, uma vermelha, e uma verde.
 \item Uma bola está prestes a ser tirada da urna por um homem vendado.
\end{itemize}
\end{document}

Removing paralist solves the problem. This is probably because the class already loads enumitem so you should use its facilities for inline lists if you need them.

For example:

\PassOptionsToPackage{inline,shortlabels}{enumitem}
\documentclass[
12pt,% tamanho da fonte
twoside,% para impressão em frente e verso
a4paper,% tamanho do papel
]{abntex2}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\begin{document}
\begin{itemize}
 \item Há três bolas nesta urna, uma azul, uma vermelha, e uma verde.
 \item Uma bola está prestes a ser tirada da urna por um homem vendado.
\end{itemize}
\begin{enumerate*}
  \item first
  \item second
  \item third
\end{enumerate*}
\begin{enumerate}[(i)]
  \item first
  \item second
  \item third
\end{enumerate}
\end{document}

variant lists

cfr
  • 198,882
  • thanks a lot, you're right, paralist was the issue. according to this package documentation, though, something such as \begin{enumerate}[(i)] ... \end{enumerate} should work, but it doesn't. i'm trying to understand what this package actually does. it's a pity, for its paraenum ambient is quite useful. – Daniel Diniz Oct 25 '15 at 02:44
  • enumitem provides the same features and more. Take a look at its documentation. I've never used paralist because enumitem provides pretty much everything I've needed, including inline lists. It can also be set up to recognise the short-label-type-specs favoured by enumerate which I think is what you're referring to. – cfr Oct 25 '15 at 03:09
  • @DanielDiniz Please see edit above. You can pretty much get what you want, I think, just passing a couple of options to enumitem before \documentclass. – cfr Oct 25 '15 at 03:16
  • I hadn't seen the edit on your previous comment, thanks for your help! I'm glad to see I can still have the inline tools and be able to compile the code... I'll compare enumitem to paralist to see which is easier to use and suits this document better. – Daniel Diniz Oct 25 '15 at 03:20
0

paralist has two options olditem and oldenum. If you add these options, then paralist will not change the itemize and enumerate environment, but still provide asparaenum and inparaenum:

\usepackage[olditem,oldenum]{paralist}
jarauh
  • 2,762
  • 15
  • 27
  • I still can't understand how paralist works. The documentation says that newitem and newnum are default options; olditem and oldenum have to be explicitly declared. ok. the package's documentation states the following. – Daniel Diniz Oct 25 '15 at 03:29
  • "All the itemized and enumerated environments have optional arguments to specify the format of the labels. The following examples will only work if you have loaded paralist without the options olditem and oldenum. Using the L A TEX standard classes, itemize uses the following symbols for the labels of the four list levels: • – ∗ ·. If you want to change this for a particular environment, just say something like \begin{itemize}[$\star$] and * will be used instead of the default symbol. – Daniel Diniz Oct 25 '15 at 03:29
  • however, `\documentclass[ 12pt, twoside, a4paper, ]{abntex2} \usepackage{paralist}

    \begin{document} \begin{itemize}[$\star$] \item Há três bolas nesta urna. \item Uma bola está prestes a ser tirada da urna por um homem vendado. \end{itemize} \end{document}` doesn't work...

    – Daniel Diniz Oct 25 '15 at 03:30
  • With the option olditem, paralist does not change itemize. Therefore, you also cannot use the optional argument described in the documentation of paralist. The problem is, as cfr observed, that the class abntex2 already pulls in the package enumitem, which also changes itemize; see http://tex.stackexchange.com/questions/162799/compilation-error-when-including-enumitem-and-paralist-packages. By the way, on this linked question, one of the answers claims that "You don;t need to use the paralist package at all." – jarauh Oct 25 '15 at 03:36
  • I see... Since it's very important for me to stick with the abntex2 class, I think I'll just tinker with enumitem and get rid of paralist altogether. I didn't know that abntex2 already calls enumitem when I first got this error. – Daniel Diniz Oct 25 '15 at 03:40
  • @DanielDiniz By the way, when you are satisfied with one of the answers, you should mark it as the correct answer. – jarauh Oct 27 '15 at 00:37