5

How to prepare a list of the items in the following manner:

  1. i. Question

    ii. List item

    iii. Next item

  2. i. New list

    ii. Next question

Below is the MWE of my attempt. The second item prints as '1. ii.' while I want the output to be simply `ii.' The margin for roman numerals should be aligned.

\documentclass[10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

\usepackage{enumerate}
\usepackage[inline, shortlabels]{enumitem}

% 
\begin{document}

\begin{enumerate}[label=1.~\roman*.]
  \item Solve a given first order ordinary differential equation (ODE) like (a) Radioactive decay (b) Newton's law of cooling (c) Current in LR, RC circuit with DC source using Euler/RK 4 Order method.
  \item This item should print the output simply `ii.' instead of `1. ii.'
\end{enumerate}

\end{document}

enter image description here

1
  • 1
    You need to employ two, nested enumerate environments.
    – Mico
    Commented May 16, 2023 at 15:33

1 Answer 1

5

This is the default behaviour if you don't add anything for the first level of enumeration. That is, the second level enumeration is set next to the first.

enter image description here

\documentclass{article}

\usepackage{enumitem}

\setlist[enumerate,1]{label=\arabic*.}
\setlist[enumerate,2]{label=\roman*.,align=left}

\begin{document}

\begin{enumerate}
  \item
  \begin{enumerate}
    \item Question
    \item List item
    \item Next item
  \end{enumerate}
  
  \item
  \begin{enumerate}
    \item New list
    \item Next question
  \end{enumerate}
\end{enumerate}

\end{document}

From here you can adjust the other elements (like spacing).

1
  • 2
    +1. The instruction \setlist[enumerate,1]{label=\arabic*.} is the default setting and thus could be omitted (or commented out).
    – Mico
    Commented May 16, 2023 at 15:36

You must log in to answer this question.

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