1

I am new to Latex and trying to add parts to main question by using \begin{parts}. When I run my code, I get the error "!LaTeX error: Environment parts undefined"

\documentclass[11pt]{article}

\def\convw #1{\mathop{\rightarrow}\limits^{#1}}
\usepackage{amssymb,amsthm,amsmath,fancyhdr,enumerate}
\usepackage{mathpazo}
\usepackage{fullpage}
\begin{document}

\section*{}
\subsection*{Problem 1}
\begin{enumerate}
\item Conditional Probabilty
\begin{parts}
\part marginal probability density.
\part posterior density
\end{parts}
\end{enumerate}
\end{document}

Can anyone please tell what I am doing wrong. Do I need to include any specific package for it.

3
  • Do you work in the exam class? Jan 29, 2015 at 17:45
  • Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem.
    – Adam Liter
    Jan 29, 2015 at 17:51
  • I have updated the code.
    – user30438
    Jan 29, 2015 at 17:54

1 Answer 1

3

Probably you wanted to use the exam class, where the environment parts is defined.

MWE

\documentclass{exam}

\begin{document}

\section*{}
\subsection*{Problem 1}
\begin{enumerate}
\item Conditional Probabilty
\begin{parts}
\part marginal probability density.
\part posterior density
\end{parts}
\end{enumerate}

\end{document} 

Output

enter image description here

otherwise substitute

\begin{parts}
\part marginal probability density.
\part posterior density
\end{parts}

with

\begin{enumerate}
\item marginal probability density.
\item posterior density
\end{enumerate}

MWE

\documentclass[11pt]{article}

\def\convw #1{\mathop{\rightarrow}\limits^{#1}}
\usepackage{amssymb,amsthm,amsmath,fancyhdr,enumerate}
\usepackage{mathpazo}
\usepackage{fullpage}

\begin{document}

\section*{}
\subsection*{Problem 1}
\begin{enumerate}
\item Conditional Probabilty
\begin{enumerate}
\item marginal probability density.
\item posterior density
\end{enumerate}
\end{enumerate}

\end{document} 

enter image description here

You must log in to answer this question.

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