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.

The MWE is as follows:

\documentclass[12pt,letter]{report}

\usepackage[titles]{tocloft}

\usepackage[compact,tiny]{titlesec}

\begin{document}

\setcounter{tocdepth}{3}

\setlength\cftaftertoctitleskip{0pt}

\titlespacing*{\chapter}{0.00in}{0.48in}{5mm}
\titleformat{\chapter}[display]{\normalfont\normalsize\filcenter}{%
  \centering\chaptertitlename\ \thechapter}{0pt}{\normalsize\uppercase}

\renewcommand{\contentsname}{TABLE OF CONTENTS}
\renewcommand{\cftchapfont}{\normalsize}
\renewcommand{\cftchappagefont}{\normalsize}
\renewcommand{\cftchapleader}{\normalsize\cftdotfill{\cftchapdotsep}}

\tableofcontents

\univchapter[first chapter]{first chapter}
some text
\univchapter[second chapter]{second chapter}
some more text
\end{document}

The definition of \univchapter is

\newcommand\univchapter{\if@openright\cleardoublepage\else\clearpage\fi
                    \thispagestyle{plain}%
                    \global\@topnum\z@
                    \@afterindentfalse
                    \secdef\@univchapter\@schapter}

\def\@univchapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
                         \refstepcounter{chapter}%
                         \typeout{\@chapapp\space\thechapter.}%
                         \addcontentsline{toc}{chapter}%
                                   {\chaptername\, \protect\numberline{\thechapter} \uppercase{#1}}%
                    \else
                    \addcontentsline{toc}{chapter}{\chaptername\, \uppercase{#1}}%
                    \fi
                    \chaptermark{#1}%
                    \addtocontents{lof}{\protect\addvspace{10\p@}}%
                    \addtocontents{lot}{\protect\addvspace{10\p@}}%
                    \if@twocolumn
                      \@topnewpage[\@makechapterhead{#2}]%
                    \else
                      \@makechapterhead{#2}%
                      \@afterheading
                    \fi}

The error it generates while creating a MWE and also while executing the code with your suggestion is Use of \@ doesnt match its definition. \univchapter...i\thispagestyle{plain}global \@t opnum\z@afterindentfal....

share|improve this question

1 Answer 1

up vote 6 down vote accepted

You can use the tocloft package and change the length \cftaftertoctitleskip; a little example (instead of 0pt, you can use the length that best suits your needs):

\documentclass[12pt,letter]{report}
\usepackage{tocloft}

\setlength\cftaftertoctitleskip{0pt}

\begin{document}

\tableofcontents
\chapter{first chapter}
some text
\chapter{second chapter}
some more text
\end{document}

enter image description here

To be consistent, you might also want to change \cftafterlottitleskip (for the LoT) and \cftafterloftitleskip (for the LoF).

Since the titles option for tocloft is being used (as it is now clear from an edit to the original question), changes to \cftaftertoctitleskip will have no effect; in this case, a possible solution would be to patch the \tableofcontents, \listoffigures, and \listoftables commands to add some negative space; here's an example with the new settings provided in the edits to the original question:

\documentclass[12pt,letterpaper]{report}
\usepackage[titles]{tocloft}
\usepackage[compact,tiny]{titlesec}
\usepackage{etoolbox}

\makeatletter
\patchcmd{\tableofcontents}{\@starttoc{toc}}{\vskip-10pt\@starttoc{toc}}{}{}
\patchcmd{\listoffigures}{\@starttoc{lof}}{\vskip-10pt\@starttoc{lof}}{}{}
\patchcmd{\listoftables}{\@starttoc{lot}}{\vskip-10pt\@starttoc{lot}}{}{}
\makeatother

\makeatletter
\newcommand\univchapter{\if@openright\cleardoublepage\else\clearpage\fi
                    \thispagestyle{plain}%
                    \global\@topnum\z@
                    \@afterindentfalse
                    \secdef\@univchapter\@schapter}

\def\@univchapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
                         \refstepcounter{chapter}%
                         \typeout{\@chapapp\space\thechapter.}%
                         \addcontentsline{toc}{chapter}%
                                   {\chaptername\, \protect\numberline{\thechapter} \uppercase{#1}}%
                    \else
                    \addcontentsline{toc}{chapter}{\chaptername\, \uppercase{#1}}%
                    \fi
                    \chaptermark{#1}%
                    \addtocontents{lof}{\protect\addvspace{10\p@}}%
                    \addtocontents{lot}{\protect\addvspace{10\p@}}%
                    \if@twocolumn
                      \@topnewpage[\@makechapterhead{#2}]%
                    \else
                      \@makechapterhead{#2}%
                      \@afterheading
                    \fi}
\makeatother

\setcounter{tocdepth}{3}

\titlespacing*{\chapter}{0.00in}{0.48in}{5mm}
\titleformat{\chapter}[display]{\normalfont\normalsize\filcenter}{%
  \centering\chaptertitlename\ \thechapter}{0pt}{\normalsize\uppercase}

\renewcommand{\contentsname}{TABLE OF CONTENTS}
\renewcommand{\cftchapfont}{\normalsize}
\renewcommand{\cftchappagefont}{\normalsize}
\renewcommand{\cftchapleader}{\normalsize\cftdotfill{\cftchapdotsep}}

\begin{document}

\tableofcontents

\univchapter[first chapter]{first chapter}
some text
\univchapter[second chapter]{second chapter}
some more text
\end{document}

enter image description here

share|improve this answer
    
I used your suggestion, now I have edited the question, I need to use it under certain circumstances, please help me –  Arun Desiraju Oct 29 '12 at 18:51
    
@ArunDesiraju nevermind. I updated my answer with a solution. –  Gonzalo Medina Oct 29 '12 at 19:00
    
If I use your updated solution, it works for the MWE, but for my thesis, it gives an error while inputting the acknowledgments, and chapter names. I have updated the MWE with the format for the chapter title. Please check it out –  Arun Desiraju Oct 29 '12 at 19:11
1  
@ArunDesiraju my last update uses exactly the settings you posted and there's no error. If you are getting an error, the cause has to be somewhere else. Please add (I mean add and not change) a minimal, complete version of the problematic code (reproducing the problem mentioned) to your question. –  Gonzalo Medina Oct 29 '12 at 19:18
    
I am looking for the problem in my thesis, but the solution that you provided moves the heading up or down by the parameter specified against \vskip. But I want the distance between the top edge of the page and the heading to be unchanged, and move the contents below the heading up or down. How can it be done? –  Arun Desiraju Oct 29 '12 at 20:09

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.