Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Start second level of enumeration in the same line.

762 views
Skip to first unread message

MMasroorAli

unread,
Nov 21, 2007, 12:42:51 PM11/21/07
to
Dear all,
I have a code like the following,

\begin{enumerate}[1.]
\item
\begin{enumerate}[i)]
\item A
\item B
\item C
\end{enumerate}
\end{enumerate}

Which generates an output like:

1.
i) A
ii) B
iii) C

but I want the roman i just beside 1, like the following:

1. i) A
ii) B
iii) C

Could you please tell me how to do this?

If a style file is used it must be compatible with beamer. Otherwise,
a generic solution will be appreciated.

Regards,

Werner Grundlingh

unread,
Nov 21, 2007, 1:09:27 PM11/21/07
to

This minimal example generates exactly what you requested:

\documentclass{article}

\usepackage{enumitem}

\begin{document}

\begin{enumerate}[label=\arabic*.]
\item
\begin{enumerate}[label=\roman*)]
\item First item
\item Second item
\item Third item
\end{enumerate}
\end{enumerate}
\end{document}

I used the enumitem package, available online via CTAN from
http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=enumitem
to change the item labels according to your
first level: arabic.
second level: roman)
requirement. The documentation is very well written, if you want more
information on this subject.

Hope this helps,
Werner

MMasroorAli

unread,
Nov 21, 2007, 9:22:41 PM11/21/07
to

I tried using enumitem before. But as was pointed out in my post, this
clashes with beamer. See the minimal example below,

\documentclass[fleqn]{beamer}

\usepackage{enumitem}

\begin{document}

% This one works fine

\begin{frame}
\frametitle{Test}


\begin{enumerate}[label=\arabic*.]
\item
\begin{enumerate}[label=\roman*)]
\item First item
\item Second item
\item Third item
\end{enumerate}
\end{enumerate}

\end{frame}


% But not this one
\begin{frame}
\frametitle{A}

\begin{itemize}
\item A
\end{itemize}

\end{frame}

\end{document}

This generates the error message,

! Undefined control sequence.
<argument> .../enumerate \beameritemnestingprefix
body end
l.30 \end{frame}

Dan

unread,
Nov 24, 2007, 3:08:35 PM11/24/07
to
On Nov 21, 11:42 am, MMasroorAli <mmasroor...@cse.buet.ac.bd> wrote:
> Dear all,
> I have a code like the following,
>
> \begin{enumerate}[1.]
> \item
> \begin{enumerate}[i)]
> \item A
> \item B
> \item C
> \end{enumerate}
> \end{enumerate}
>
> Which generates an output like:
>
> 1.
> i) A
> ii) B
> iii) C
>
> but I want the roman i just beside 1, like the following:
>
> 1. i) A
> ii) B
> iii) C
>

This is LaTeX's default behavior. Perhaps you are using a
package that changes it. Either 1) do without that package, or
2) check its documentation for how to acheive this. If both these
suggestions fail, reveal the package so people who know its
behavior can help you.

If beamer itself makes this change, repeat 2) wrt beamer.
If that fails, report back with your findings.


Dan

0 new messages