Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Ruminateer opened this issue Aug 9, 2022 · 1 comment

Comments

@Ruminateer
Copy link

Ruminateer commented Aug 9, 2022

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.

@mforbes
Copy link

mforbes commented Oct 1, 2023

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):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants