[Tex/LaTex] Specify vertical space between outlines (enumerate) levels

#enumerateitemizeline-spacing

I'm using the outlines package, and I'm curious to know how to modify the vertical spacing between entries/items in the outline. I'm happy with using \onehalfspacing for the vertical spacing between lines in a single entry/item. But how can I set the space between different entries/items to something else (for example to doublespacing)?

Here is a working example in which the line spacing is set to onehalf. How can I modify it so that the entries/items in the outline are more than onehalf spaced apart? (This working example has some customizations with which the currently-requested solution would need to be compatible.)

\documentclass[11pt,a4paper]{article}        
\usepackage{setspace}

% Outlines configurations
\usepackage{outlines}
\usepackage{enumitem}
\setenumerate[1]{label=\Roman*.}
\setenumerate[2]{label=\Alph*.}
\setenumerate[3]{label=\roman*.}
\setenumerate[4]{label=\alph*.}
\makeatletter
\newenvironment{myoutline}[1][]{%
  \ifthenelse{\equal{#1}{}}{}{\renewcommand{\ol@type}{#1}}%
  \ol@z%
  \newcommand{\0}{\ol@toz\ol@z}%
  \newcommand{\1}{\ol@toi\scshape\bfseries\LARGE\ol@i\item}%
  \newcommand{\2}{\ol@toii\normalfont\Large\bfseries\ol@ii\item}%
  \newcommand{\3}{\ol@toiii\normalfont\normalsize\ol@iii\item}%
  \newcommand{\4}{\ol@toiiii\normalfont\normalsize\ol@iiii\item}%
}{%
  \ol@toz\ol@exit%
}
\makeatother

\begin{document}

\onehalfspacing

\begin{outline}[enumerate]
\1 Mathematics
    \2 The study of topics such as quantity (numbers), structure, space, and change. There is a range of views among mathematicians and philosophers $\ldots$
    \2 Often, mathematics is conceptually divided into two camps: applied and pure mathematics.  In reality, however, mathematics does not rigidly abide by this dichotomy.
\1 Computer Science
    \2 Computer Science (abbreviated CS or CompSci) is the scientific and practical approach to computation and its applications. It is the systematic study of the $\ldots$
        \3 Famous computer scientists
            \4 Charles Babbage
            \4 Donald Knuth
        \3 History of computer science
\end{outline}


\end{document}

Ideally, I'm looking for a solution where I can just modify a single scalar value, such as something like:

  \newcommand{\outlinespacingscalar}{1.5}

so that I can adjust this scalar to get the look and feel that seems best for a given document.

Best Answer

I renewed the definition of the outline environment, sticking in a \vspace that employs the value of outlinespacingscalar, as requested. I took your request to mean you only wanted the extra space for instances of \1, though clearly different values of gap could likewise be set for the other instances.

\documentclass[11pt,a4paper]{article}        
\usepackage{outlines}
\usepackage{setspace}

% Outlines configurations
\usepackage{enumitem}
\setenumerate[1]{label=\Roman*.}
\setenumerate[2]{label=\Alph*.}
\setenumerate[3]{label=\roman*.}
\setenumerate[4]{label=\alph*.}
\makeatletter
% the outline environment provides commands \1..\4 for
% introducing items at level 1..4, and \0 for normal paragraphs
% within the outline section.
\renewenvironment{outline}[1][]{%
  \ifthenelse{\equal{#1}{}}{}{\renewcommand{\ol@type}{#1}}%
  \ol@z%
  \newcommand{\0}{\ol@toz\ol@z}%
  \newcommand{\1}{\vspace{\dimexpr\outlinespacingscalar\baselineskip-\baselineskip}\ol@toi\ol@i\item}%
  \newcommand{\2}{\ol@toii\ol@ii\item}%
  \newcommand{\3}{\ol@toiii\ol@iii\item}%
  \newcommand{\4}{\ol@toiiii\ol@iiii\item}%
}{%
  \ol@toz\ol@exit%
}
\makeatother
\def\outlinespacingscalar{1.5}

\begin{document}

\onehalfspacing

\begin{outline}[enumerate]
\1 Mathematics
    \2 The study of topics such as quantity (numbers), structure, space, and change. There is a range of views among mathematicians and philosophers $\ldots$
    \2 Often, mathematics is conceptually divided into two camps: applied and pure mathematics.  In reality, however, mathematics does not rigidly abide by this dichotomy.
\1 Computer Science
    \2 Computer Science (abbreviated CS or CompSci) is the scientific and practical approach to computation and its applications. It is the systematic study of the $\ldots$
        \3 Famous computer scientists
            \4 Charles Babbage
            \4 Donald Knuth
        \3 History of computer science
\end{outline}


\end{document}

enter image description here