0

Using easylist, how do I set up vertical spacing between various "levels"? (Page 8 in the manual seems to be the appropriate section for this question but I am still confused.) For example, the vertical spacing between a level 1 entry and another level 1 entry; the vertical spacing between level 1 entry and level 2 entry; the vertical spacing between level 2 entry and level 2 entry; the vertical spacing between level 2 entry and level 3 entry; the vertical spacing between level 3 entry and level 3 entry.

MWE:

\documentclass[12pt]{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[american]{babel}
\usepackage{microtype}
\usepackage{libertine}
\usepackage[at]{easylist}
\ListProperties(Hang=true,Margin=-3pc, Align=3pc, Indent=1em)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{easylist}
@ Level 1, item 1

@ Level 1, item 2

@@ Level 2, item 3

@@ Level 3, item 4

@ Level 1, item 5

@@ Level 2, item 6

@@@ Level 3, item 7

@@@ Level 3, item 8

@@ Level 2, item 9

@ Level 1, item 10
\end{easylist}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

1 Answer 1

2

Your reference regarding Page 8 of the easylist manual is quite detailed. Perhaps the following illustration would help:

...             |    ...
Level n item    |    Level !=n item
Spacen*         |    Spacen
Level n item    |    Level n item
...             |    ...

For example, Space1 sets the vertical spacing before a first level item if the preceding item is from a level other than level 1; the starred version Space1* sets the vertical spacing before a 1st level item if the preceding item is from the same level. Here is an example:

\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[american]{babel}
\usepackage{microtype}
\usepackage{libertine}
\usepackage[at]{easylist}
\ListProperties(Hang=true,Margin=-3pc, Align=3pc, Indent=1em)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{easylist}
\ListProperties(Space1=0.75cm, % Level not 1, Space1,  Level 1
                Space1*=0.25cm,% Level 1,     Space1*, Level 1
                Space2=1cm,    % Level not 2, Space2,  Level 2
                Space2*=0.5cm, % Level 2,     Space2*, Level 2
                Space3=0.33cm, % Level not 3, Space3,  Level 3
                Space3*=0.1cm, % Level 3,     Space3*, Level 3
                )
@ Level 1, item 1

@ Level 1, item 2

@@ Level 2, item 3

%@@ Level 3, item 4
@@ Level 2, item 4

@ Level 1, item 5

@@ Level 2, item 6

@@@ Level 3, item 7

@@@ Level 3, item 8

@@ Level 2, item 9

@ Level 1, item 10
\end{easylist}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}

item spacing


Due to the implementation of easylist, in particular the following code found in easylist.sty

\expandafter\ifnum\el@PreviousItem=\el@CounterLevel
    \vskip\csname Space\the\el@CounterLevel*\endcsname
\else
    \vskip\csname Space\the\el@CounterLevel\endcsname
\fi

we see that: If previous and current items are at the same level, then Spacen* is used; otherwise, Spacen is used.

To define vertical space between Level 3 and Level 2, you can only do so by specifying Space2. To define vertical space between Level 3 and Level 1, you can only do so by specifying Space1. The point is: Think vertical space before the current item, not after.

2
  • Is it possible to define vertical spacing, say, between Level 3 and Level 2, and, Level 3 and Level 1? (Actually, this was the whole point of the original question but I forgot to mention it.)
    – blackened
    Commented Sep 23, 2018 at 9:42
  • 1
    @blackened Yes, you can, by specifying Space2 and Space1, respectively. But I think you are still thinking about vertical space added after the current item. The package adds vertical space before items. Please check my added discussions. Commented Sep 23, 2018 at 15:08

You must log in to answer this question.

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