0

I am currently modifying my own documentstyle and I would like to change the spacing before and after the enumerate-environment globally. I already fond the possible solution using the package enumitem, but I don't want to include another package for this. I'd like to this the proper way and redefine the enumerate-environment. Does anybody know how?

Minimal working example:

\documentclass[submit,reqno,oneside,a4paper,10pt]{amsproc}
\usepackage{blindtext}
\begin{document}
    \blindtext
    % This spacing should be bigger
    \begin{enumerate}
        \item Item 1
        \item Item 2
    \end{enumerate}
    % This spacing should be bigger
    \blindtext
\end{document}
  • The manual of enumitem answers your question. Why don’t you want to include that package and use its options? – alchemist Feb 07 '23 at 17:45
  • This answer could be the solution to your question : https://tex.stackexchange.com/a/148665/229853 – Houcine Feb 07 '23 at 17:48
  • @alchemist I don't want to use that much packages because this style-file I am currently working on is going to be bigger and I don't want to include for every little adjustment a new package. – C'est La Tex Feb 07 '23 at 17:49
  • @Houcine But this also needs a new package. I would like to renew the command of enumerate. – C'est La Tex Feb 07 '23 at 17:52
  • This is the kind of problem that can quickly get out of hand and lead to reinventing what is a pretty complex wheel. What do you want to happen when you embed your redefined enumerate? Should the parameters be the same or different etc. While there's something to be said for not using too many packages in a custom class, this is one problem that I don't think is ideally suited for making your own version. That being said, you can look into the latex source https://texdoc.net/pkg/source2e for how lists are implemented in the kernel. – Alan Munn Feb 07 '23 at 17:56
  • This is a possible solution that I am looking for. Thank you! – C'est La Tex Feb 07 '23 at 18:07

1 Answers1

0

Well, uf the suggestion made by Alan Munn doesn't work, here is a way to change settings globally using the options of the enumitem package (which I am aware of you don't want to use). But if you change your mind, this example may be of help:

\documentclass[a4paper,11pt]{article}

\usepackage[inline]{enumitem}

\usepackage{lipsum}

\setlist{label={\arabic.},leftmargin=,itemsep=0pt,parsep=0pt,topsep=12pt}

\begin{document}

\lipsum[1][1-4]

\begin{enumerate}[topsep=3pt]
    \item just an item
    \item and another item
\end{enumerate}

\lipsum[1][5-8]

\begin{enumerate}[resume,topsep=30pt]
    \item just an item
    \item and another item
\end{enumerate}

\lipsum[1][9-11]
    \begin{enumerate}[resume]
    \item just an item
    \item and another item
\end{enumerate}

\lipsum[1][11-]

\end{document}

The length topsep is one of the two lengths defining the separation between the last text line and the first item (and at the bottom the other way round). The length parskip is the other one. Usually changing topsep suffices.

enumitem_topspe

alchemist
  • 1,761