Lista enumerada central (formateo de inducción matemática)

Oct 22 2020

Estoy intentando replicar este ejercicio:

En este momento, tengo lo siguiente (incluiré un MWE).

\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}

Como se puede ver claramente, mi replicación es exacta, excepto por las listas (A) - (B), que no puedo averiguar cómo centrar. Si los encierro en un centerentorno, no pasa nada. Si agrego \centeringdentro de los entornos enumerados, ambos elementos se centran individualmente. Si utilizo la varwidthsolución que generalmente se propone (ver aquí ), obtengo un formato diferente al que quiero (supongo que porque cargo el hyperrefpaquete, ver aquí ).

Cualquier comentario sobre cómo se puede lograr el formato deseado será muy apreciado, ¡gracias!

Respuestas

2 egreg Oct 22 2020 at 08:16

varwidthno puede hacer su trabajo cuando hyperrefquiere establecer anclas.

Puede emular con a tabular, si sus elementos no son demasiado largos. Sin embargo, también agregué un enfoque diferente, simplemente moviendo los elementos más hacia la derecha de enumeratelo que lo haría.

\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}[1][\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}

La segunda instancia es mucho más atractiva, en mi opinión.

1 StefanH Oct 22 2020 at 07:18

Debe ponerlo en un bloque y luego centrarlo como una unidad. Lo más fácil sería a, minipagepero luego debe especificar el ancho. Una alternativa entonces es el varwidthpaquete que define una minipágina de ancho variable. (En mi opinión se vuelve difícil de leer y prefiero la solución sin centrar).

\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}