Text Formatting ⇒ sublist in a list
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
sublist in a list
How do you create a list such as 1. a) ..2. a) ..etc.. where the letter and the number are perfectly aligned relative to each other?
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
sublist in a list
I recommend using the enumitem package. Follow the link to see the documentation for alignment/margin/indentation options.
Stefan
Stefan
LaTeX.org admin
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
Re: sublist in a list
I still don't understand how to apply the code
-
- Posts: 162
- Joined: Wed Jun 17, 2009 10:18 pm
sublist in a list
Is this what you want?
Code: Select all
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}
\item Item
\begin{enumerate}[label=\alph*)]
\item Subitem
\item Subitem
\end{enumerate}
\item Item
\begin{enumerate}[label=\alph*)]
\item Subitem
\item Subitem
\end{enumerate}
\end{enumerate}
\end{document}
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
Re: sublist in a list
the a) should be aligned with the number and not have so much horizontal spacing between the number and the letter.
-
- Posts: 162
- Joined: Wed Jun 17, 2009 10:18 pm
sublist in a list
It's quite easy to figure out how to do that from the manual.
I added the necessary parameters for the first sublist only. You can define a new list type with these features, see section 2.2 of the manual.
Code: Select all
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}
\item Item
\begin{enumerate}[label=\alph*),leftmargin=0pt,topsep=0pt]
\item Subitem
\item Subitem
\end{enumerate}
\item Item
\begin{enumerate}[label=\alph*)]
\item Subitem
\item Subitem
\end{enumerate}
\end{enumerate}
\end{document}
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
Re: sublist in a list
I did not mean it vertically spaced. I meant that a) and 1. should be aligned horizontally looking literally like "1. a)" as if you are doing a math problem.
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
Re: sublist in a list
And the manual just says "These are equivalent to the well known list parameters," after those commands above. It does not say anything about what they do! Maybe those commands are explained in detail in another package. I don't know..
-
- Posts: 162
- Joined: Wed Jun 17, 2009 10:18 pm
sublist in a list
Sorry, that wasn't entirely obvious from what you wrote. I can't really think of a good way of doing that right now, perhaps someone else has a suggestion.ghostanime2001 wrote:I did not mean it vertically spaced. I meant that a) and 1. should be aligned horizontally looking literally like "1. a)" as if you are doing a math problem.