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 would like to control the spacing after and before the list of algorithms title to fit all the algorithms in one page.

\documentclass[12pt,headsepline,a4paper,BCOR=10mm,twoside,titlepage,pdftex,cleardoubleplain]{scrbook}
\usepackage[english,ruled,vlined,linesnumbered]{algorithm2e}
\usepackage{tocloft}
\usepackage[nottoc,notlot,notlof]{tocbibind}
\cleardoublepage
\pagenumbering{gobble}
\tableofcontents
\cleardoublepage


\pagenumbering{arabic}
\setcounter{page}{1}
\newpage

\input{chapters/chapter1}
\input{chapters/chapter2}
\appendix
\input{chapters/Appendix}
\listofalgorithms
\backmatter
\bibliographystyle{alpha}
\bibliography{library}
\end{document}
share|improve this question

1 Answer 1

up vote 4 down vote accepted

I wouldn't do this, since there is no consistency with other chapter titles, but if you really want to do this, here is what you can do.

You have two commands to control the spacing before and after the chapter titles, \chapterheadstartvskip and \chapterheadendvskip, respectively.

You can modify them locally to change only the appearance of the List of Algorithms:

\begingroup
\renewcommand*{\chapterheadstartvskip}{\vspace*{-80pt}}
\renewcommand*{\chapterheadendvskip}{\vspace*{0pt}}
\listofalgorithms
\endgroup

In this way, all other chapters are not affected by this change.

The following MWE

\documentclass[12pt,headsepline,a4paper,BCOR=10mm,twoside,titlepage,pdftex,cleardoubleplain]{scrbook}
\usepackage[english,ruled,vlined,linesnumbered]{algorithm2e}
\usepackage{tocloft}
\usepackage[nottoc,notlot,notlof]{tocbibind}
\begin{document}
\cleardoublepage
\pagenumbering{gobble}
\tableofcontents
\cleardoublepage


\pagenumbering{arabic}
\setcounter{page}{1}
\newpage

\begingroup
\renewcommand*{\chapterheadstartvskip}{\vspace*{-80pt}}
\renewcommand*{\chapterheadendvskip}{\vspace*{0pt}}
\listofalgorithms
\endgroup

\chapter{a chapter}
\begin{algorithm}
  \caption{An algorithm}
\end{algorithm}

\end{document} 

yields this result for the LoA page:

enter image description here

Adjust the above parameters to fit your needs.

share|improve this answer
    
Thanks a lot, that's perfect :) –  shrief Mar 31 at 12:06
    
@shrief You're welcome. –  karlkoeller Mar 31 at 14:24

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.