enumitem icon indicating copy to clipboard operation
enumitem copied to clipboard

[Feature Request] Support a "botsep" that can be set to different value from topsep

Open Ruminateer opened this issue 3 years ago • 1 comments

The package uses topsep for the margin before and after the listing. I wish to be able to set the bot margin differently from the top margin. Maybe have a key called botsep that

  • If not set, still use topsep value for the bot margin
  • If set, override the topsep value

I understand that we can workaround this by using the after key, but I am having a problem using after with vspace. Here is a minimal example to reproduce the issue

\documentclass{article}
\usepackage{enumitem}
\setlist{nosep}

\begin{document}
    \begin{itemize}
        \item aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbc
        \vspace*{0ex}
    \end{itemize}
    after
\end{document}

The last c in the example will introduce extra unwanted space between the line and after. image

If we just make the line one character shorter the issue is gone. image

In this example, I can get around this by adding an empty line or \par before the \vspace. image

For the package seems that after=\par\vspace*{0ex} will result in a compile error. I asked on https://tex.stackexchange.com/ and found that I can use \endgraf instead of \par to make it work. But I still think a built-in botsep will make life a lot easier, especially for those who are not experts in latex.

Ruminateer avatar Aug 09 '22 20:08 Ruminateer

A couple of comments:

  • bottomsep is probably a better spelling than botsep as it seems more people naturally gravitate towars this.
  • One should also include a customizable\parbottomsep.
  • \partopsep and \parbottomsep should be documented. (It is documented in source2e, but this can be hard for new users to find.)

There are a variety of relevant topics at TeX Stack Exchange. The following look for a customizable \parbottomsep.

Others would benefit from \bottomsep, but the specific questions can be answered by using before= and after=.

Some potential issues/interactions to also consider (just collecting for now: these might not be useful):

mforbes avatar Oct 01 '23 15:10 mforbes