Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I simply want to nest lists for answering homework problems with multiple parts as such

\begin{description}
 \item[3]
 \item[5]
\begin{enumerate}
  \item
  \item
 \end{enumerate}
\end{description}

and to have the nested list all aligned. I can't find a way to do this automatically, and I know the answer may be simple but this is bothering me a lot. My document class is article and I tried using enumitem with no success.

share|improve this question

2 Answers 2

The description environment naturally has a 'hanging' indent after the first line, which is giving your 'undesired' output.

It sounds like it would be more appropriate to use an itemize environment in your particular case, which gives the following output:

screenshot

Here's the code:

% arara: pdflatex
\documentclass{article}
\begin{document}
\begin{itemize}
 \item[3]
 \item[5]
\begin{enumerate}
  \item
  \item
 \end{enumerate}
\end{itemize}
\end{document}

If you want the first-level items to be bold then you can use the enumitem package to help

screenshot bold

% arara: pdflatex
% !arara: indent: {overwrite: yes}
\documentclass{article}
\usepackage{enumitem}

\setlist[itemize]{font=\bfseries}

\begin{document}
\begin{itemize}
    \item[3]
    \item[5]
          \begin{enumerate}
            \item
            \item
          \end{enumerate}
\end{itemize}
\end{document}
share|improve this answer
    
Thanks so much!! –  Ryan Feb 7 at 17:11

Some variation on @cmhughes's solution: load enumitem with the shortlabels option and use enumerate in both cases:

        \begin{enumerate}[\bfseries1. ]
         \item
         \item
        \begin{enumerate}[1)]
          \item
          \item
         \end{enumerate}
        \end{enumerate}

givesenter image description here

Or, if you want the labels of both lists at the left margin, use the same preamble and this code:

        Lalala…
                    \begin{enumerate}[\bfseries1.,wide,labelindent = 0pt]
                     \item
                     \item
                    \begin{enumerate}[1),,wide, labelindent = 0pt]
                      \item
                      \item
                     \end{enumerate}
                    \end{enumerate}
        Lalala…

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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