3

Currently, I am using an unmodified version of the standard enumerate command. The following code gives me labels that go "1.", "2.", "3."

\section{Section}
\subsection{Subsection}
\begin{enumerate}
\item
\item
\item
\end{enumerate}

I would like the labels to go "1.1.A.", "1.1.B.", "1.1.C." instead. (And of course, that they be set up in such a way that the numbers change in the expected manner for later sections and subsections.) In particular, I'm trying to copy the exercise numbering in this document.

How can I accomplish this?

0

1 Answer 1

6

It's easy with enumitem:

\documentclass{article}
\usepackage{enumitem}

\newenvironment{enumyikes}
 {\begin{enumerate}[label=\thesubsection.\Alph{*},leftmargin=*,align=left]}
 {\end{enumerate}}

\begin{document}

\section{Section}

\subsection{Subsection}

\begin{enumyikes}
\item First
\item Second
\item Third
\end{enumyikes}

\end{document}

Usual recommendation: are you really sure this is what you want to inflict to your readers?

The picture was obtained with \usepackage{showframe}

enter image description here

6
  • enumyikes!?? yikes!
    – user11232
    Sep 23, 2015 at 16:02
  • Perhaps adding a conditional, so in case there's no subsection only the section counter is prepended? Sep 23, 2015 at 16:07
  • Thanks! I'm writing a solutions document to some notes with exercises that are labeled this way.
    – Potato
    Sep 23, 2015 at 16:14
  • Is there any way to get the labels to be left-aligned, like the exercises in the following document? (Warning: large .pdf) math.stanford.edu/~vakil/216blog/FOAGsep1815public.pdf
    – Potato
    Sep 23, 2015 at 16:17
  • (When I try your code, the left edges of the labels seem to vary in position.)
    – Potato
    Sep 23, 2015 at 16:20

You must log in to answer this question.

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