# Vertical space between list items in OPmac

I want to add some space between items in a list:

\input opmac

\def\itemhook{\vskip 7pt\relax}

\begmulti 2
\begitems
* $y=3x^2=x=2$.
* $y=3+8x-x^2-x^3$.
* $y=7-18x-3x^2+4x^3$.
* $y=6-15x+18x^2-4x^3$.
\enditems
\endmulti

\bye


Unfortunately, the last item has additional space after it making the columns unbalanced. Any ideas how to fix?

• Does this helps: \def\iiskip{\vskip 7pt\relax}? Jun 28 '16 at 3:58
• @JagathAR - sorry, no that seems to be for space before and after the list, not between items. Jun 28 '16 at 4:21

The problem is, that your \vskip7pt is breaking point after the second item and it is discarded. The second column includes \iiskip (default \medskip, 6pt plus...minus...) after fourth item and \vfil is appedned here by \endmulti. You see \medskip after fourth item but nothing after second item in your illustration image. The \parskip0pt plus1pt is stretched between first and second item. Note, that the first glue before item list (from \iiskip) is discarded by \begmulti.

If you set \begmulti 2 \def\iiskip{} Now, only \vfil is after fourth item and it is slightly stretched. But first column stretches in \parskip, so there is no exactly balancing. The final solution is to set \parskip to a value without stretchability:

\input opmac

\def\itemhook{\vskip 7pt\relax}

\begmulti 2 \def\iiskip{}\parskip=0pt
\begitems
* $y=3x^2=x=2$.
* $y=3+8x-x^2-x^3$.
* $y=7-18x-3x^2+4x^3$.
* $y=6-15x+18x^2-4x^3$.
\enditems
\endmulti

\bye

• When I change font it happens again: \input opmac \input fontfam \margins/1 a5 (1,1,1,1)in \fontfam[tg schola] \begitems \style n \begmulti 2 \def\iiskip{}\parskip=0pt * $x^2+x-3$. * ${1\over 3}x^3+3x+1$. * $x^4+4x^3+6x^2+4x+1$. * ${1\over 3}x^6+{1\over 4}x^4+2x^2+3$. * $x^5-4x^4+x^2-4x$. * $x^7+7x^5+21X^3-14x$. * $x^4-x^2+4x-1$. * $3+2x^2+7x^4-11x^5$. * $ax^3+bx^2+cx+f$. * $a+bx^2+cx^4+ex^5.$ \endmulti \enditems \bye Jun 29 '16 at 14:42
• The balancing works perfectly only for equidistant lines. The \endmulti adds \vfil after the last item (because there can be odd number of items when \begmulti 2 for example). If you adds two fractions to the second column (like they are in the first) then you can find the good balancing. Or advance \baselineskip. Or another method: remove \vfil and add stretchable glue between items. I. e. remove \parskip=0pt and do \def\tmp#1\vfil{} \expandafter\tmp\endmulti. Jun 29 '16 at 19:00
• So is it safe to say that of the possible solutions, the most reliable for lining up the baselines of the last items in the columns is to use \def\tmp#1\vfil{} \expandafter\tmp\endmulti ? Are there any other possible issues with it? Jun 30 '16 at 2:18