I encounter an error when I compile a LaTeX document which includes both the enumitem
and the paralist
packages.
Here is my MWE code:
\documentclass{article}
\usepackage{enumitem}
\usepackage{paralist}
\begin{document}
\begin{tabular}{lp{10cm}}
\scshape Assume: & \begin{compactenum}
\item $(p_1, p_2)$ is an optimal price sequence
\item $p_2 > p_1 > 0$
\end{enum}
\\
\scshape Prove: & False
\end{tabular}
\begin{enumerate}[label=\bfseries Case \arabic*:,leftmargin=*]
\item
It rains today.
\item
It does not rain today.
\end{enumerate}
\end{document}
How do I fix the error?
Is there a way to define my own compactenum
using enumitem
so I don't need to include the paralist
package?
Best Answer
You don;t need to use the
paralist
package at all. Just use the starred variant of the environments from theenumitem
package -- requires to add theinline
option to theenumitem
package:If you don't want the enumerat in the tabular to be on its own line you can tweak all the paramaters used for vertical spacing. Below I used
[topsep=0pt,partopsep=0pt,itemsep=0pt, parsep=0pt]
to achieve:References:
Compilation Error
You original compilation error can be fixed via:
paralist
beforeenumitem
.\end{cenum}
with\end{compactenum}
Code:
inline
Code:
Tight Spacing
:Code:
Fix Compilation Error