Is there any way that I can change \\parskip
to a different value inside certain environments, namely enumerate
and itemize
.
I wan
The following addition to the preamble updates enumerate
to make the suggested change:
\let\oldenumerate\enumerate% Keep a copy of \enumerate (or \begin{enumerate})
\let\endoldenumerate\endenumerate% Keep a copy of \endenumerate (or \end{enumerate})
\renewenvironment{enumerate}
{\begin{oldenumerate}
\setlength{\parskip}{0pt}}% Adjust \parskip to suit your needs
{\end{oldenumerate}}
Here is a complete minimal example showing the adjustment when setting \parskip
to 0pt
:
\documentclass{article}
\begin{document}
\begin{enumerate}
\item First line
Second line
\end{enumerate}
\let\oldenumerate\enumerate
\let\endoldenumerate\endenumerate
\renewenvironment{enumerate}
{\begin{oldenumerate}
\setlength{\parskip}{0pt}}
{\end{oldenumerate}}
\begin{enumerate}
\item First line
Second line
\end{enumerate}
\end{document}
One would do exactly the same for itemize
.