2

I'm having a vertical spacing glitch in this minimal example:

\documentclass[11pt,twoside]{book}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage{microtype,textcomp}
\usepackage[total={6.25in,10in},left=1.25in,top=0.5in,includehead,includefoot]{geometry}
\usepackage{enumitem}
\usepackage{tabularx}
\usepackage{multicol}

\begin{document}

\begin{enumerate}
    \item %Blabla
        \begin{multicols}{2}
        \begin{enumerate}[label=\alph*),itemsep=11pt]
            \item This is a simple test.
            \item This is a simple test.
        \end{enumerate}
        \end{multicols}
    \smallskip % Without this command, the spacing is too small!
    \item %Blabla
        \begin{multicols}{2}
        \begin{enumerate}[label=\alph*),itemsep=11pt]
            \item This is a simple test.
            \item This is a simple test.
        \end{enumerate}
        \end{multicols}
    \smallskip
    \item Blabla bla blabla bla bla bla blabla.
\end{enumerate}

\end{document}

Preview of what this code is doing, and the glitch shown in red: enter image description here

The space indicated in red is too big, compared to the green one. It's uneven and I don't understand why. If I remove the \smallskip command, it's then too small. If I remove the babel package (which I don't want to do!), then the issue is solved.

So what am I doing wrong here? How can I fix this issue, while keeping the french babel command?

Note that I need to keep the multicols environments inside the enumerate. The full document has lots of them.

3
  • tex.stackexchange.com/a/7229/134144 could be useful.
    – leandriis
    Commented Sep 24, 2021 at 15:04
  • As an alternative to the multicolumn + nested enumerate environment approach, you could use a tasks environment inside of enumerate. For an example see here: tex.stackexchange.com/a/378651/134144
    – leandriis
    Commented Sep 24, 2021 at 15:07
  • This is a problem with the redefinitions done to the list environments by babels french option. They somehow result in not seeing properly what spaces are already around and thus ending up adding the wrong one. your problem goes away when you change from "french" to say "english" in babel (or take it out). My suggestion is to talk to Daniel the maintainer of the french option of babel as you say you need the french option. Commented Sep 25, 2021 at 8:30

3 Answers 3

1

babel-french customizes vertical spacing in lists (i.e. \itemsep, \parsep, \partopsep, \topsep) when French is the main language, but provides an option \frenchsetup{StandardListSpacing} to revert to the standard settings.

In this example, enumitem is loaded. It enables a far better control on lists than babel-french, so I strongly recommend to use option StandardListSpacing and let enumitem alone customize lists.

The glitch mentioned vanishes with \frenchsetup{StandardListSpacing}. Actually, the vertical space above item 3 is reduced by babel-french (without this option) which looks wrong, the one between items 1 and 2 is unchanged.

2
  • How do you add this option? At which place in the code? I’m getting compilation errors if I add it to the preamble or inside the enumerate environment.
    – Cham
    Commented Sep 26, 2021 at 19:17
  • You have to add it in the preambule and after \usepackage[french]{babel}. If your installation is a bit old, you can try \frenchbsetup{StandardListSpacing} instead. Commented Sep 26, 2021 at 20:04
0

This is not a solution to the problem which is I think a bug in the french ldf file for babel, but if you are contend with less space what seem to work is to reduce the extra space that multicol adds above and below of the environment, e.g., add

\AddToHook{env/enumerate/begin}{\setlength\multicolsep{\itemsep}}

to your preamble. But as I said, this need to be looked at from the babel code which I think has a bug here.

-1

I don't know if this is what you need, but by simply adding an itemsep in the first enumerate helps

My code output

 \documentclass[11pt,twoside]{book}
    \usepackage[T1]{fontenc}
    \usepackage[french]{babel} % Removing this command rise some vertical space!
    \usepackage{microtype,textcomp}
    \usepackage[total={6.25in,10in},left=1.25in,top=0.5in,includehead,includefoot]{geometry}
    \usepackage{enumitem}
    \usepackage{tabularx}
    \usepackage{multicol}
\begin{document}
    \begin{enumerate}[itemsep=11pt]
        \item
            \begin{multicols}{2}
            \begin{enumerate}[label=\alph*)]
                \item TTTTTTTTTTTT
                \item TTTTTTTTTTTT
            \end{enumerate}
            \end{multicols}
     \item
            \begin{multicols}{2}
            \begin{enumerate}[label=\alph*)]
                \item TTTTTTTTTTTT
                \item TTTTTTTTTTTT
            \end{enumerate}
            \end{multicols}
    \item TTTTTTTTTTTT
    \end{enumerate}
\end{document}
4
  • 1
    Sorry, this answer doesn’t consider the issue.
    – Cham
    Commented Sep 24, 2021 at 15:44
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Sep 24, 2021 at 16:48
  • I find this a bit pityful that 2 people have downvoted this answer (not a common occurance in this forum). It may not have solved the underlying issue, which is a bug in the french .ldf but it gives a reasonable workaround. Commented Sep 25, 2021 at 10:32
  • Tbf I had misunderstood the problem, so it has been edited, which is probably why it got downvoted
    – FireDuckz
    Commented Sep 25, 2021 at 10:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .