Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

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

share|improve this answer
    
No need to load outlines more than once. –  Werner May 5 at 19:25
    
@Werner Woops, that was my mistake. –  synaptik May 5 at 19:27
    
@Werner Fixed.. –  Steven B. Segletes May 5 at 19:45

Since you are using enumitem you can add an itemsep= and/or parsep= to the \setenumerate:

enter image description here

Below I have defined \ItemSpacing and \ParSpacing both of which are applied to all the list levels, but you could define a separate one for each level if desired.

Code:

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

\newcommand{\ItemSpacing}{15pt}%
\newcommand{\ParSpacing}{10pt}%

% Outlines configurations
\usepackage{outlines}
\usepackage{enumitem}
\setenumerate[1]{itemsep={\ItemSpacing},parsep={\ParSpacing},label=\Roman*.}
\setenumerate[2]{itemsep={\ItemSpacing},parsep={\ParSpacing},label=\Alph*.}
\setenumerate[3]{itemsep={\ItemSpacing},parsep={\ParSpacing},label=\roman*.}
\setenumerate[4]{itemsep={\ItemSpacing},parsep={\ParSpacing},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}
share|improve this answer
    
No need to load outlines more than once. –  Werner May 5 at 19:25
    
@Werner Woops, that was my mistake. –  synaptik May 5 at 19:27
    
Thanks Peter. One more thing... the AdditionalItemSpacing space is only applied between multiple items in a given enum group. It is not applied between, for example, \3 Famous computer scientists and \4 Charles Babbage. Do you know to make the spacing also appear after between consecutive items at different levels, such as between a \3 and a \4? –  synaptik May 5 at 19:58
    
@synaptik: Have updated solution which now provides two separate settings. Let me know if that is what you desired. –  Peter Grill May 5 at 21:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.