
¿Puede decirme por qué el entorno de subenumeración no está alineado horizontalmente después de usarlo \restoregeometry
?
\documentclass{article}
\usepackage{geometry, lipsum}
\begin{document}
\begin{enumerate}
\item
\newgeometry{} \restoregeometry
\item \lipsum[1]
\begin{enumerate}
\item \lipsum[2] %Why is the right hand side of this paragraph not horizontally aligned with the rest of the text?
\end{enumerate}
\item \lipsum[3]
\end{enumerate}
\end{document}
Respuesta1
\newgeometry restablece \linewidth al \textwidth predeterminado. Puede restablecer el valor correcto para la lista como esta.
\documentclass{article}
\usepackage{geometry}
\usepackage{lipsum}
\begin{document}
\begin{enumerate}
\item aa
\newgeometry{} \restoregeometry
\advance\linewidth -\rightmargin
\advance\linewidth -\leftmargin
\item \lipsum[1]
\begin{enumerate}
\item \lipsum[2] %Why is the right hand side of this paragraph not horizontally aligned with the rest of the text?
\end{enumerate}
\item \lipsum[3]
\end{enumerate}
\end{document}
Pero en general sería mejor no usar \newgeometry en medio de un entorno. No espera esto.
Respuesta2
He encontrado una solución:
\documentclass{article}
\usepackage{geometry, lipsum}
\begin{document}
\begin{enumerate}
\item
\end{enumerate}
\newgeometry{} \restoregeometry
\begin{enumerate} \setcounter{enumi}{1}
\item \lipsum[1]
\begin{enumerate}
\item \lipsum[2]
\end{enumerate}
\item \lipsum[3]
\end{enumerate}
\end{document}