#StackBounty: #table-of-contents #titlesec #tocloft #titletoc Make decrease the space between title of list of figures and list of tabl…

Bounty: 100

I try to reduce the space between the title name of list of figure (“Liste des Figures” on the image below) and the list of figures.

I would like to do the same for the title name of list of tables (“Liste des Tables”).

The particularity of my case is that I want to have the list of figures and the list of tables on the same page.

As you can see, decreasing the space betwwen the title ans lists would allow me to have all just on a single page.

lists too long : that takes 2 pages

The issue is also that I am using a special style for chapter, table of contents, list of figure … etc (the black rectangle with the horizontal line above titles).

I show you below the source that I use :

documentclass[11pt,french,oneside]{report}
usepackage[latin1]{inputenc}
usepackage[T1]{fontenc}
usepackage[francais]{babel}
usepackage{indentfirst}
usepackage{lastpage}
usepackage{amsmath,amssymb}
usepackage{fancyhdr}
usepackage{url}
usepackage{epsfig}
usepackage{graphics}
usepackage{multirow}
usepackage{vmargin}
usepackage{float}
usepackage{psboxit,pstcol}
usepackage{tabularx}

usepackage[style=ext-authoryear, backend=biber]{biblatex}
usepackage[hyperfootnotes=false,colorlinks,allcolors=blue]{hyperref}
usepackage[nameinlink,noabbrev]{cleveref}
Crefname{appendix}{l'Appendice}{les Appendices}
usepackage{setspace}
usepackage{needspace}
usepackage{caption}

usepackage[table,svgnames,dvipsnames]{xcolor}
usepackage{calc}
usepackage{geometry}

setcounter{tocdepth}{3}
setcounter{secnumdepth}{3}

DeclareCaptionFont{xbf}{bfseriesboldmath}
captionsetup{font=xbf}

definecolor{jonquil}{rgb}{0.98, 0.85, 0.37}
definecolor{lavender(web)}{rgb}{0.9, 0.9, 0.98}

DeclareFixedFont{ttb}{T1}{txtt}{bx}{n}{9} % for bold
DeclareFixedFont{ttm}{T1}{txtt}{m}{n}{9}  % for normal

usepackage{color}
definecolor{deepblue}{rgb}{0,0,0.5}
definecolor{deepred}{rgb}{0.6,0,0}
definecolor{deepgreen}{rgb}{0,0.5,0}

usepackage{listings}

newcommandpythonstyle{lstset{
language=Python,
basicstyle=ttm,
otherkeywords={self},             % Add keywords here
keywordstyle=ttbcolor{deepblue},
emph={MyClass,__init__},          % Custom highlighting
emphstyle=ttbcolor{deepred},    % Custom highlighting style
stringstyle=color{deepgreen},
frame=tb,                         % Any extra options here
showstringspaces=false,

commentstyle=ttbselectfontitshape,columns=fullflexible], 
numbers=left,
stepnumber=1,
}}

newcolumntype{C}{>{centeringarraybackslash}X}

usepackage{colortbl} % for rowcolor macro
usepackage{array}
setlengthextrarowheight{1.5pt} % for a more open "look"
usepackage[skip=0.5baselineskip]{caption}

renewcommand*{nameyeardelim}{addcommaspace}

newcommand*{x}{mathsf{x}mskip1mu}

DeclareCiteCommand{cite}[mkbibparens]
  {usebibmacro{prenote}}
  {usebibmacro{citeindex}%
   printtext[bibhyperref]{usebibmacro{cite}}}
  {multicitedelim}
  {usebibmacro{postnote}}

DeclareCiteCommand*{cite}[mkbibparens]
  {usebibmacro{prenote}}
  {usebibmacro{citeindex}%
   printtext[bibhyperref]{usebibmacro{citeyear}}}
  {multicitedelim}
  {usebibmacro{postnote}}

newcommand{emptysection}[1]{%
    begingrouprenewcommandaddcontentsline[3]{}%
    section{#1}endgroup%
}

makeatletter
newlength{chapter@number@width}
def@makechapterhead#1{%
  {normalfont
  setlength{parindent}{0pt}%
  vspace*{10pt}%
  settowidth{chapter@number@width}{%
    hbox{color{white}LARGEbfseries
          hspace{dimexpr 1mm+3pt}%
          thechapter
          hspace{dimexpr 1mm+3pt}%
    }}
  hbox{%
    vtop{%
      hsize=dimexprchapter@number@width+tabcolsep+2fboxrule+tabcolsep
      begin{tabular}[t]{@{}c}
        scshapestrutmakebox[0pt]{hspace{0pt plus 1 fill minus 1 fill}@chapapphspace{0pt plus 1 fill minus 1 fill}} \
        fboxsep=0pt
        colorbox{black}{vbox{%
           hbox{vbox to dimexpr 1mm+3pt{}}
           hbox{color{white}LARGEbfseries
                 hspace{dimexpr 1mm+3pt}%
                 thechapter
                 hspace{dimexpr 1mm+3pt}%
                }
           hrule height 0.4pt depth 0pt width 0pt
           hbox{vbox to 6pt{}}
           hbox{parbox{0pt}{Hugebfseriesvphantom{E}}}
           }}%
      end{tabular}%
      }%
    vtop{%
      advancehsize by -dimexprchapter@number@width+2fboxrule+tabcolsep
      hspace*{-0.5cm}begin{tabular}[t]{c}
        scshapestrutvphantom{@chapapp} \
        fboxsep=0pt
        colorbox{white}{vbox{%
           hbox{vbox to dimexpr 1mm+3pt{}}
           hbox{LARGEbfseries
                 hspace{dimexpr 1mm+3pt}%
                 phantom{thechapter}
                 hspace{dimexpr 1mm+3pt}%
                }
           hrule height 0.4pt depth 0pt width hsize
           hbox{vbox to 6pt{}}
           hbox{hspace*{20pt}parbox{dimexprtextwidth-2mm-6pt-chapter@number@width-tabcolsep-2fboxrule-20pt}{Hugebfseries #1}}
           }}%
      end{tabular}%
      }%
    }%
  vspace{50pt}%
  }
}
def@makeschapterhead#1{%
  {normalfont
  setlength{parindent}{0pt}%
  vspace*{10pt}%
  settowidth{chapter@number@width}{%
    hbox{color{white}LARGEbfseries
          hspace{dimexpr 1mm+3pt}%
          thechapter
          hspace{dimexpr 1mm+3pt}%
    }}
  hbox{%
    vtop{%
      hsize=dimexprchapter@number@width+tabcolsep+2fboxrule+tabcolsep
      begin{tabular}[t]{@{}c}
        scshapestrutmakebox[0pt]{hspace{0pt plus 1 fill minus 1 fill}phantom{@chapapp}hspace{0pt plus 1 fill minus 1 fill}} \
        fboxsep=0pt
        colorbox{black}{vbox{%
           hbox{vbox to dimexpr 1mm+3pt{}}
           hbox{color{white}LARGEbfseries
                 hspace{dimexpr 1mm+3pt}%
                 phantom{thechapter}%
                 hspace{dimexpr 1mm+3pt}%
                }
           hrule height 0.4pt depth 0pt width 0pt
           hbox{vbox to 6pt{}}
           hbox{parbox{0pt}{Hugebfseriesvphantom{E}}}
           }}%
      end{tabular}%
      }%
    vtop{%
      advancehsize by -dimexprchapter@number@width+2fboxrule+tabcolsep
      hspace*{-0.5cm}begin{tabular}[t]{c}
        scshapestrutvphantom{@chapapp} \
        fboxsep=0pt
        colorbox{white}{vbox{%
           hbox{vbox to dimexpr 1mm+3pt{}}
           hbox{LARGEbfseries
                 hspace{dimexpr 1mm+3pt}%
                 phantom{thechapter}
                 hspace{dimexpr 1mm+3pt}%
                }
           hrule height 0.4pt depth 0pt width hsize
           hbox{vbox to 6pt{}}
           hbox{hspace*{20pt}parbox{dimexprtextwidth-2mm-6pt-chapter@number@width-tabcolsep-2fboxrule-20pt}{Hugebfseries #1}}
           }}%
      end{tabular}%
      }%
    }%
  vspace{50pt}%
  }
}

setlengthparindent{0pt}


newenvironment{changemargin}[2]{begin{list}{}{%
setlength{topsep}{0pt}%
setlength{leftmargin}{0pt}%
setlength{rightmargin}{0pt}%
setlength{listparindent}{parindent}%
setlength{itemindent}{parindent}%
setlength{parsep}{0pt plus 1pt}%
addtolength{leftmargin}{#1}%
addtolength{rightmargin}{#2}%
}item }{end{list}}



setmarginsrb{2.3cm}{0.0cm}{2.1cm}{1cm}{1.3cm}{0.5cm}{0.4cm}{1cm}
pagestyle{fancy}
renewcommand{footrulewidth}{0.4pt}
renewcommand{headrulewidth}{0.4pt}
chead{hspace{-0.3cm}textit{Rapport de stage M2 Astrophysique, Sciences de lrq Espace, Plan'etologie hspace{-0.3cm}}}
lhead{epsfig{file=logo_small.jpg,height=0.8cm,width=2cm}}
rhead{epsfig{file=logo_ut3_small.png,height=0.8cm,width=2cm}}
lfoot{textit{lisssold riufi}}
cfoot{hspace{1.6cm} textit{ - Performances}} 
rfoot{thepage/pageref{LastPage}}

makeatletter
g@addto@macroappendix{%
  cleardoublepage
  hypertarget{appendixstart}{}%
  addtocontents{toc}{
    protectcontentsline{chapter}{protecthyperlink{appendixstart}{Appendice}}{}{}%
  }%
}
makeatother

usepackage[nameinlink,noabbrev]{cleveref}
renewcommand{arraystretch}{1.25} 

begin{document}

renewcommand*listfigurename{Liste des Figures}
renewcommand*listtablename{Liste des Tables}

tableofcontents

%%%%%% CRITICAL PART TO GET list of figures and list of tables %%%%
%%%%%% ON THE SAME PAGE %%%%%
%%%%%% This is HERE where I would like to reduce space between title
%%%%%% list while keeping the special style of titles (like chapters)

thispagestyle{plain}
listoffigures
begingroup
letclearpagerelax
listoftables
endgroup
thispagestyle{plain}

chapter*{Introduction}
addcontentsline{toc}{chapter}{Introduction}

If I use only :

setlength{cftbeforeloftitleskip}{5pt} % LOF: Listing of Figures
setlength{cftbeforelottitleskip}{5pt} % LOT: Listing of Tables

this causes the removing of the special format of chapters and table of figures, table of tables and also this makes push up all to the table of contents, i.e the mess up …

If someone could help me to produce one single page while keeeping the special style for both titles, this would be nice to tell me how to do it.

Regards


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.