I'm a beginner in LaTeX and I've picked up a university template for a group report.
I can't figure out where I can change the chapter headings which have too much white space, both top and bottom. The template uses fncychap but I can't seem to find anything in there to change it. There's also a class file. Where am I likely to find an option for this? What should I look for? Can I manually override this?
For instance, our table of contents page is about a quarter whitespace at the top, which results in that it leaks out onto two pages which is completely unnecessary.
For starter's, I've gathered there are templates in fncychap, but I can't seem to figure out which one is used. This is the contents in the class file:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Fancy Chapter Headings
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% (must be loaded before hyperref)
\RequirePackage{./local/fncychap/fncychap}
%
% customizations
\makeatletter
\ChNameVar{\raggedleft\Huge\rm}
\ChNumVar{\Huge\rm}
\ChTitleVar{\raggedleft\Huge\sf\bfseries}
\ChRuleWidth{2pt}
\renewcommand{\DOCH}{%
\vskip -0.5\baselineskip
\mghrulefill{\RW}\par\nobreak
\CNV\FmN{\@chapapp}\space \CNoV\thechapter
\par\nobreak
\vskip -0.5\baselineskip
}
\renewcommand{\DOTI}[1]{%
\mghrulefill{\RW}\par\nobreak
\CTV\FmTi{#1}\par\nobreak
\vskip 60\p@
}
\renewcommand{\DOTIS}[1]{%
\mghrulefill{\RW}\par\nobreak
\CTV\FmTi{#1}\par\nobreak
\vskip 60\p@
}
What is DOCH/DOTI etc.? I tried to play around with \vskip but it didn't seem to have any noticeable effect.
(The Template in Question)
Best Answer
If all you need is less space above the word "Contents", you can change the definition of
\DOTIS
. It stands for DO TItle Star form and it will be the first thing in an unnumbered chapter. If you put\vspace*{-50pt}
just before \mghrulefill, that will cancel the 50pt of space added byfncychap
. As an alternative, you could redefine\@makeschapterhead
fromfncychap.sty
, removing or altering the\vspace*{50pt}
line.If you want even numbered chapters to have less top space, you can redefine
\DOCH
. This stands for DO Chapter Heading and is the first thing in a numbered chapter. You can start it with\vspace*{-50pt}
for the same reason. An alternative is to redefine\@makechapterhead
and remove or alter the starting\vspace
command.I would change the
\@make...
commands. The following simply remove the\vspace*{50pt}
:Put this in your preamble (before
\begin{document}
).