0

I want to make a "double" list using enumerate such that the outside is bold and italic and the inside is normal font. I tried using this code that I came up with:

\large\textbf{\textit{
\begin{enumerate}

\item Proofs
\normalfont{\normalsize{
\begin{enumerate}
    \item Proof by Contradiction
    \item Mathematical Induction
    \item Pigeonhole Principle
    \item Parity Argument
\end{enumerate}}}

\item Divisibility
\end{enumerate}}}

It works with the first item, but it fell apart for the second item. This is what I have when it is compiled on Overleaf:

enter image description here

How can I fix it so that the "Divisibility" is also bold and italic?

2 Answers 2

2

Simple with enumitemand its before key:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{enumitem}
\usepackage{lipsum} 

\begin{document}

\begin{enumerate}[before=\large\itshape\bfseries]
\item Proofs
\begin{enumerate}[before=\normalfont\normalsize]
    \item Proof by Contradiction
    \item Mathematical Induction
    \item Pigeonhole Principle
    \item Parity Argument
\end{enumerate}
\item Divisibility
\end{enumerate}
\lipsum[11]

\end{document} 

enter image description here

3
  • Yes thank you. Why doesn't my code work?
    – CELLSecret
    Commented Jul 17, 2021 at 21:00
  • Not sure, but I suspect that \normalfont is not a command with an argument, but a simple directive, which means: from this point on, use normal font, so that it's not limited to the nested enumerate (contrary to the before` key`).
    – Bernard
    Commented Jul 17, 2021 at 22:17
  • Ohhh I see thanks
    – CELLSecret
    Commented Jul 19, 2021 at 3:38
4

How about this?

\documentclass{article}
\newcommand{\lbi}[1]{{\large\textbf{\textit{#1}}}}
\usepackage{enumitem}
\begin{document}

\begin{enumerate}[label={\lbi{\arabic*.}}]
\item
\lbi{Proofs}
\begin{enumerate}
    \item Proof by Contradiction
    \item Mathematical Induction
    \item Pigeonhole Principle
    \item Parity Argument
\end{enumerate}
\item
\lbi{Divisibility}
\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 .