# Center Enumerated List (Formatting Mathematical Induction)

I am attempting to replicate this exercise: Right now, I have the following (I will include an MWE for it). \documentclass[11pt]{article}

\usepackage[margin=1in]{geometry}
\usepackage{amsmath,amssymb}
\usepackage{enumitem}

\newcommand{\N}{\mathbb{N}}

\begin{document}

\begin{enumerate}
\item[2.] Prove the following variants of the Principle of Mathematical Induction:
\begin{enumerate}
\item For each $n\in\N$, let $P(n)$ be a proposition and let $n_0$ be some natural number. Suppose the following two results:
\begin{enumerate}[label={(\Alph*)}]
\item $P(n_0)$ is true.
\item If $P(k)$ is true, then $P(k+1)$ is also true.
\end{enumerate}
Then $P(n)$ is true for all natural numbers $n$ such that $n\geq n_0$.
\item For each $n\in\N$, let $P(n)$ be a proposition. Suppose the following two results:
\begin{enumerate}[label={(\Alph*)}]
\item $P(1)$ is true.
\item If $P(r)$ is true for all $r$ such that $1\leq r\leq k$, then $P(k+1)$ is true.
\end{enumerate}
Then $P(n)$ is true for all natural numbers $n$.
\end{enumerate}
\end{enumerate}

\end{document}


As can plainly be seen, my replication is exact except for the (A)-(B) lists, which I cannot figure out how to center. If I enclose them in a center environment, nothing happens. If I add \centering within the enumerate environments, both items are centered individually. If I use the varwidth solution that is generally proposed (see here), I get different formatting than what I want (I'm guessing because I load the hyperref package -- see here).

Any thoughts on how my desired formatting can be achieved, would be much appreciated, thanks!

varwidth is not able to do its business when hyperref wants to set anchors.

You can emulate with a tabular, if your items aren't too long. However, I also added a different approach, by simply moving the items more to the right than enumerate would do.

\documentclass[11pt]{article}

\usepackage[margin=1in]{geometry}
\usepackage{amsmath,amssymb}
\usepackage{enumitem}
\usepackage{varwidth}
\usepackage{hyperref}

\newcounter{tabitem}\newcounter{tabitemplus}
\newcommand{\tabitem}{\refstepcounter{tabitem}\makebox[\labelwidth][r]{\thetabitem\ }\ignorespaces}
\renewcommand{\theHtabitem}{\thetabitemplus\arabic{tabitem}}
\newenvironment{centerenum}[\Alph]
{%
\begin{center}
\setcounter{tabitem}{0}\stepcounter{tabitemplus}%
\renewcommand{\thetabitem}{(#1{tabitem})}%
\renewcommand{\arraystretch}{1.2}
\begin{tabular}{@{}l@{}}
}
{\end{tabular}\end{center}}

\newcommand{\N}{\mathbb{N}}

\begin{document}

\begin{enumerate}
% tabular
\item Prove the following variants of the Principle of Mathematical Induction:
\begin{enumerate}
\item For each $n\in\N$, let $P(n)$ be a proposition and let $n_0$ be some
natural number. Suppose the following two results:
\begin{centerenum}
\tabitem\label{A1} $P(n_0)$ is true.
\\
\tabitem\label{B1} If $P(k)$ is true, then $P(k+1)$ is also true.
\end{centerenum}
Then $P(n)$ is true for all natural numbers $n$ such that $n\geq n_0$.
\item For each $n\in\N$, let $P(n)$ be a proposition. Suppose the following two results:
\begin{centerenum}
\tabitem\label{A2} $P(0)$ is true.
\\
\tabitem\label{B2} If $P(r)$ is true for all $r$ such that $0\leq r\leq k$,
then $P(k+1)$ is true.
\end{centerenum}
Then $P(n)$ is true for all natural numbers $n$.
\end{enumerate}

% wider margin
\item Prove the following variants of the Principle of Mathematical Induction:
\begin{enumerate}
\item For each $n\in\N$, let $P(n)$ be a proposition and let $n_0$ be some
natural number. Suppose the following two results:
\begin{enumerate}[label={(\Alph*)},leftmargin=4em]
\item $P(n_0)$ is true.
\item If $P(k)$ is true, then $P(k+1)$ is also true.
\end{enumerate}
Then $P(n)$ is true for all natural numbers $n$ such that $n\geq n_0$.
\item For each $n\in\N$, let $P(n)$ be a proposition. Suppose the following two results:
\begin{enumerate}[label={(\Alph*)},leftmargin=4em]
\item $P(0)$ is true.
\item If $P(r)$ is true for all $r$ such that $0\leq r\leq k$, then $P(k+1)$ is true.
\end{enumerate}
Then $P(n)$ is true for all natural numbers $n$.
\end{enumerate}
\end{enumerate}

\end{document} The second instance is much more appealing, in my opinion.

You need to put it in a block and then center it as one unit. The easiest would be a minipage but then you need to specify the width. An alternative then is the varwidth package that defines a variable width minipage. (In my opinion it becomes hard to read and I prefer the solution without centering).

\documentclass[11pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath,amssymb}
\usepackage{enumitem}
\newcommand{\N}{\mathbb{N}}

\usepackage{varwidth}

\begin{document}
\begin{enumerate}
\item[2.] Prove the following variants of the Principle of Mathematical Induction:
\begin{enumerate}
\item For each $n\in\N$, let $P(n)$ be a proposition and let $n_0$ be some natural number. Suppose the following two results:
\begin{center}
\begin{varwidth}{\linewidth}
\begin{enumerate}[label={(\Alph*)},parsep=0pt]
\item $P(n_0)$ is true.
\item If $P(k)$ is true, then $P(k+1)$ is also true.
\end{enumerate}
\end{varwidth}
\end{center}
Then $P(n)$ is true for all natural numbers $n$ such that $n\geq n_0$.
\item For each $n\in\N$, let $P(n)$ be a proposition. Suppose the following two results:
\begin{center}
\begin{varwidth}{\linewidth}
\begin{enumerate}[label={(\Alph*)},parsep=0pt]
\item $P(1)$ is true.
\item If $P(r)$ is true for all $r$ such that $1\leq r\leq k$, then $P(k+1)$ is true.
\end{enumerate}
\end{varwidth}
\end{center}
Then $P(n)$ is true for all natural numbers $n$.
\end{enumerate}
\end{enumerate}
\end{document} • Hi! Thanks for your response. Unfortunately, as noted in my question, I am using hyperref and thus will need a different fix. Are you aware of any? – Shady Puck Oct 22 '20 at 7:30