1

enter image description here

Hi! In the figure list and table list, there is an extra space between elements which belongs to other chapters. I want to remove extra space for figure and table list. How can i fix this problem? Thank you.

\documentclass[12pt]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[turkish,english,shorthands=:!]{babel}
\usepackage[a4paper,left=30mm,top=30mm,right=25mm,bottom=25mm]{geometry}
% Font and line spacing settings
\usepackage[scaled=1.00375]{newtxtext}
\usepackage[scaled=1.00375]{newtxmath}
\usepackage[nodisplayskipstretch]{setspace}
\setstretch{1.432818}% <-- 1.00375*1.427465
% Customize headings
\usepackage{titlesec}
\newcommand*{\myonevspace}{13.850574pt}% <-- Define a macro \myonehalfvspace
\newcommand*{\myonehalfvspace}{20.775861pt}% <-- Define a macro \myonehalfvspace
\newcommand*{\mytwovspace}{27.701147pt}% <-- Define a macro \mytwovspace
% For dummy texts, you can remove it.
\usepackage{lipsum} 
\usepackage{tocloft}
\usepackage{titlesec}
\usepackage{apacite}
\usepackage{graphicx}

\selectlanguage{turkish}





%****************************************
% CHAPTERS
%%% Chapter titles

% Chapter heading \titlespacing*{command}{left}{before-sep}{after-sep}[right-sep]
\titleformat{\chapter}
  {\normalfont\normalsize\bfseries}{\thechapter.}{.5em}{}
\titlespacing{\chapter}{1cm}{0cm plus 4pt minus 2pt}{\myonehalfvspace plus 2pt minus 2pt}
% Section heading
\titleformat{\section}
  {\normalfont\normalsize\bfseries}{\thesection.}{.5em}{}
\titlespacing{\section}{1cm}{\myonehalfvspace plus 4pt minus 2pt}{\myonehalfvspace plus 2pt minus 2pt}
% Subsection heading
\titleformat{\subsection}
  {\normalfont\normalsize\bfseries}{\thesubsection.}{.5em}{}
\titlespacing{\subsection}{1cm}{\mytwovspace plus 4pt minus 2pt}{\myonehalfvspace plus 2pt minus 2pt}
% Subsubsection heading
\titleformat{\subsubsection}
  {\normalfont\normalsize\bfseries}{\thesubsubsection.}{.5em}{}
\titlespacing{\subsubsection}{1cm}{\mytwovspace plus 4pt minus 2pt}{\myonehalfvspace plus 2pt minus 2pt}



\usepackage[unicode]{hyperref} %son yükle

% BEGIN
\begin{document}
\pagenumbering{gobble}

\pagenumbering{Roman}
\addtocontents{toc}{\hfill \underline{\textbf{Sayfa No}}\par} 

% Page ÖNSÖZ--------------
\addcontentsline{toc}{chapter}{ÖNSÖZ} 
\begin{center}
    \vspace*{0cm} % Top: 40mm olmalı
    {\fontsize{12pt}{12pt}\selectfont \textbf{ÖNSÖZ}}\\
\end{center}
\par \lipsum[1-1]
\clearpage
%-------------------------

% Page Etik--------------
\addcontentsline{toc}{chapter}{ETİK} 
\begin{center}
    \vspace*{0cm} % Top: 40mm olmalı
    {\fontsize{12pt}{12pt}\selectfont \textbf{ETİK}}\\
\end{center}
\par \lipsum[1-1]
\clearpage
%-------------------------

% Page TOC İçindekiler ---
\renewcommand*\contentsname{İÇİNDEKİLER}
\addcontentsline{toc}{chapter}{İÇİNDEKİLER} %içindekiler tablosunu içindekilerde gösterir.
\setcounter{secnumdepth}{3} %Kaç alt başlığın numarasını verecek belirler
\setcounter{tocdepth}{3}

\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}} % dots for chapters
\renewcommand{\cfttoctitlefont}{\MakeUppercase\hfil\bfseries\fontsize{12pt}{12pt}\selectfont}
    \vspace*{-1.8cm} 
\renewcommand\cftchapfont{\mdseries}
\renewcommand\cftchappagefont{\mdseries}
%\renewcommand{\cftchappresnum}{CHAPTER\space}
\renewcommand{\cftchapaftersnum}{.} 
\renewcommand{\cftsecaftersnum}{.} 
\renewcommand{\cftsubsecaftersnum}{.} 
\renewcommand{\cftsubsubsecaftersnum}{.} 

%\setlength{\cftbeforetoctitleskip}{10mm} 
\setlength{\cftaftertoctitleskip}{1\baselineskip}
\setlength{\cftchapnumwidth}{4em}
\setlength{\cftsecnumwidth}{4em}
\setlength{\cftsubsecnumwidth}{4em}

\setlength{\cftchapindent}{0em}
\setlength{\cftsecindent}{0em}
\setlength{\cftsubsecindent}{0em}
\setlength{\cftsubsubsecindent}{0em}

% Spacing between items
\setlength{\cftbeforechapskip}{7pt}
\setlength{\cftbeforesecskip}{\cftbeforechapskip}
\setlength{\cftbeforesubsecskip}{\cftbeforechapskip}
\setlength{\cftbeforesubsubsecskip}{\cftbeforechapskip}

\begin{singlespace}
\tableofcontents
\end{singlespace}
\clearpage
%-------------------------

% Page Figures Şekiller ---
\renewcommand*\listfigurename{ŞEKİLLER DİZİNİ}
\addtocontents{lof}{\par\nobreak\textbf{{\scshape } \hfill} \underline{\textbf{Sayfa No}}\par\nobreak} %{\scshape Şekil} kısmı eklenebilir.
\renewcommand{\cftloftitlefont}{\MakeUppercase\hfil\bfseries\fontsize{12pt}{12pt}\selectfont}
\renewcommand{\cftfigaftersnum}{.}
\renewcommand*\cftfigpresnum{Şekil~}
\settowidth{\cftfignumwidth}{\cftfigpresnum}
\renewcommand{\cftfigaftersnumb}{\quad~~}
\setlength{\cftbeforeloftitleskip}{10mm}
\setlength{\cftafterloftitleskip}{1\baselineskip}
\setlength{\cftbeforefigskip}{\cftbeforechapskip}

\begin{singlespace}
\listoffigures
\end{singlespace}
\clearpage
%-------------------------

% Page Tables Tablolar ---
\renewcommand*\listtablename{TABLOLAR DİZİNİ}
\addtocontents{lot}{\par\nobreak\textbf{{\scshape } \hfill} \underline{Sayfa No}\par\nobreak}
\renewcommand{\cftlottitlefont}{\MakeUppercase\hfil\bfseries\fontsize{12pt}{12pt}\selectfont}
\renewcommand{\cfttabaftersnum}{.}
\renewcommand*\cfttabpresnum{Tablo~}
\settowidth{\cfttabnumwidth}{\cfttabpresnum}
\renewcommand{\cfttabaftersnumb}{\quad~~}
\setlength{\cftbeforelottitleskip}{10mm}
\setlength{\cftafterlottitleskip}{1\baselineskip}
\setlength{\cftbeforetabskip}{\cftbeforechapskip}

\begin{singlespace}
\listoftables
\end{singlespace}
\clearpage
%-------------------------

\pagenumbering{arabic}


\chapter{CHAPTER}
\section{Section}
\lipsum[1]
\begin{figure}[h!]
  \centering
  %\includegraphics[height=6cm]{http://www.knittedhome.com/communities/5/004/012/872/235/images/4628207884.jpg}
  \caption{Sample Image}
  \label{fig:Sample}
\end{figure}

\begin{figure}[h!]
  \centering
  %\includegraphics[height=6cm]{http://www.knittedhome.com/communities/5/004/012/872/235/images/4628207884.jpg}
  \caption{Sample Image 2}
  \label{fig:Sample 2}
\end{figure}

\subsection{Subsection}
\lipsum[2-3]
\begin{table}[]
\centering
\begin{tabular}{lllll}
DF & DF &    & S  & S  \\
   & S  & DF &    &    \\
   & S  &    & DF &    \\
   & SD &    &    & DF
\end{tabular}
\caption{Deneme Tablosu Bir}
\label{my-label}
\end{table}

\begin{table}[]
\centering
\begin{tabular}{lllll}
DF & DF &    & S  & S  \\
   & S  & DF &    &    \\
   & S  &    & DF &    \\
   & SD &    &    & DF
\end{tabular}
\caption{Deneme Tablosu İki}
\label{my-label}
\end{table}
\subsubsection{Subsubsection}
\lipsum[3-5]
\chapter{CHAPTER}
\section{Section}
\lipsum[1]
\begin{figure}[h!]
  \centering
  %\includegraphics[height=6cm]{http://www.knittedhome.com/communities/5/004/012/872/235/images/4628207884.jpg}
  \caption{Sample Image}
  \label{fig:Sample}
\end{figure}

\begin{figure}[h!]
  \centering
  %\includegraphics[height=6cm]{http://www.knittedhome.com/communities/5/004/012/872/235/images/4628207884.jpg}
  \caption{Sample Image 2}
  \label{fig:Sample 2}
\end{figure}

\subsection{Subsection}
\lipsum[2-3]
\begin{table}[]
\centering
\begin{tabular}{lllll}
DF & DF &    & S  & S  \\
   & S  & DF &    &    \\
   & S  &    & DF &    \\
   & SD &    &    & DF
\end{tabular}
\caption{Deneme Tablosu Bir}
\label{my-label}
\end{table}

\begin{table}[]
\centering
\begin{tabular}{lllll}
DF & DF &    & S  & S  \\
   & S  & DF &    &    \\
   & S  &    & DF &    \\
   & SD &    &    & DF
\end{tabular}
\caption{Deneme Tablosu İki}
\label{my-label}
\end{table}
\subsubsection{Subsubsection}
\lipsum[3-5]
%.........................

\end{document}
2

You need to patch \@chapter in order it doesn't issue the \addvspace commands.

This needs to be done before loading hyperref, though.

I reorganized a bit your preamble to separate package loading and settings.

\documentclass[12pt]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,turkish,shorthands=:!]{babel}
\usepackage[a4paper,left=30mm,top=30mm,right=25mm,bottom=25mm]{geometry}
% Font and line spacing settings
\usepackage[scaled=1.00375]{newtxtext}
\usepackage[scaled=1.00375]{newtxmath}
\usepackage[nodisplayskipstretch]{setspace}
\setstretch{1.432818}% <-- 1.00375*1.427465
% Customize headings
\usepackage{titlesec}
% For dummy texts, you can remove it.
\usepackage{lipsum} 
\usepackage{tocloft}
\usepackage{titlesec}
\usepackage{apacite}
\usepackage{graphicx}
\usepackage{etoolbox}

% now we need to fix \@chapter
\makeatletter
\patchcmd{\@chapter}
  {\addtocontents{lof}{\protect\addvspace{10\p@}}}
  {}
  {}{}
\patchcmd{\@chapter}
  {\addtocontents{lot}{\protect\addvspace{10\p@}}}
  {}
  {}{}
\makeatother

\usepackage[unicode]{hyperref} %son yükle


\newcommand*{\myonevspace}{13.850574pt}% <-- Define a macro \myonehalfvspace
\newcommand*{\myonehalfvspace}{20.775861pt}% <-- Define a macro \myonehalfvspace
\newcommand*{\mytwovspace}{27.701147pt}% <-- Define a macro \mytwovspace

%****************************************
% CHAPTERS
%%% Chapter titles

% Chapter heading \titlespacing*{command}{left}{before-sep}{after-sep}[right-sep]
\titleformat{\chapter}
  {\normalfont\normalsize\bfseries}{\thechapter.}{.5em}{}
\titlespacing{\chapter}{1cm}{0cm plus 4pt minus 2pt}{\myonehalfvspace plus 2pt minus 2pt}
% Section heading
\titleformat{\section}
  {\normalfont\normalsize\bfseries}{\thesection.}{.5em}{}
\titlespacing{\section}{1cm}{\myonehalfvspace plus 4pt minus 2pt}{\myonehalfvspace plus 2pt minus 2pt}
% Subsection heading
\titleformat{\subsection}
  {\normalfont\normalsize\bfseries}{\thesubsection.}{.5em}{}
\titlespacing{\subsection}{1cm}{\mytwovspace plus 4pt minus 2pt}{\myonehalfvspace plus 2pt minus 2pt}
% Subsubsection heading
\titleformat{\subsubsection}
  {\normalfont\normalsize\bfseries}{\thesubsubsection.}{.5em}{}
\titlespacing{\subsubsection}{1cm}{\mytwovspace plus 4pt minus 2pt}{\myonehalfvspace plus 2pt minus 2pt}

% BEGIN
\begin{document}

%\pagenumbering{gobble} % <---- Why?

\pagenumbering{Roman}
\addtocontents{toc}{\hfill \underline{\textbf{Sayfa No}}\par} 

% Page ÖNSÖZ--------------
\addcontentsline{toc}{chapter}{ÖNSÖZ} 
\begin{center}
    \vspace*{0cm} % Top: 40mm olmalı
    {\fontsize{12pt}{12pt}\selectfont \textbf{ÖNSÖZ}}\\
\end{center}
\par \lipsum[1-1]
\clearpage
%-------------------------

% Page Etik--------------
\addcontentsline{toc}{chapter}{ETİK} 
\begin{center}
    \vspace*{0cm} % Top: 40mm olmalı
    {\fontsize{12pt}{12pt}\selectfont \textbf{ETİK}}\\
\end{center}
\par \lipsum[1-1]
\clearpage
%-------------------------

% Page TOC İçindekiler ---
\renewcommand*\contentsname{İÇİNDEKİLER}
\addcontentsline{toc}{chapter}{İÇİNDEKİLER} %içindekiler tablosunu içindekilerde gösterir.
\setcounter{secnumdepth}{3} %Kaç alt başlığın numarasını verecek belirler
\setcounter{tocdepth}{3}

\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}} % dots for chapters
\renewcommand{\cfttoctitlefont}{\MakeUppercase\hfil\bfseries\fontsize{12pt}{12pt}\selectfont}
    \vspace*{-1.8cm} 
\renewcommand\cftchapfont{\mdseries}
\renewcommand\cftchappagefont{\mdseries}
%\renewcommand{\cftchappresnum}{CHAPTER\space}
\renewcommand{\cftchapaftersnum}{.} 
\renewcommand{\cftsecaftersnum}{.} 
\renewcommand{\cftsubsecaftersnum}{.} 
\renewcommand{\cftsubsubsecaftersnum}{.} 

%\setlength{\cftbeforetoctitleskip}{10mm} 
\setlength{\cftaftertoctitleskip}{1\baselineskip}
\setlength{\cftchapnumwidth}{4em}
\setlength{\cftsecnumwidth}{4em}
\setlength{\cftsubsecnumwidth}{4em}

\setlength{\cftchapindent}{0em}
\setlength{\cftsecindent}{0em}
\setlength{\cftsubsecindent}{0em}
\setlength{\cftsubsubsecindent}{0em}

% Spacing between items
\setlength{\cftbeforechapskip}{7pt}
\setlength{\cftbeforesecskip}{\cftbeforechapskip}
\setlength{\cftbeforesubsecskip}{\cftbeforechapskip}
\setlength{\cftbeforesubsubsecskip}{\cftbeforechapskip}

\begin{singlespace}
\tableofcontents
\end{singlespace}
\clearpage
%-------------------------

% Page Figures Şekiller ---
\renewcommand*\listfigurename{ŞEKİLLER DİZİNİ}
\addtocontents{lof}{\par\nobreak\textbf{{\scshape } \hfill} \underline{\textbf{Sayfa No}}\par\nobreak} %{\scshape Şekil} kısmı eklenebilir.
\renewcommand{\cftloftitlefont}{\MakeUppercase\hfil\bfseries\fontsize{12pt}{12pt}\selectfont}
\renewcommand{\cftfigaftersnum}{.}
\renewcommand*\cftfigpresnum{Şekil~}
\settowidth{\cftfignumwidth}{\cftfigpresnum}
\renewcommand{\cftfigaftersnumb}{\quad~~}
\setlength{\cftbeforeloftitleskip}{10mm}
\setlength{\cftafterloftitleskip}{1\baselineskip}
\setlength{\cftbeforefigskip}{\cftbeforechapskip}

\begin{singlespace}
\listoffigures
\end{singlespace}
\clearpage
%-------------------------

% Page Tables Tablolar ---
\renewcommand*\listtablename{TABLOLAR DİZİNİ}
\addtocontents{lot}{\par\nobreak\textbf{{\scshape } \hfill} \underline{Sayfa No}\par\nobreak}
\renewcommand{\cftlottitlefont}{\MakeUppercase\hfil\bfseries\fontsize{12pt}{12pt}\selectfont}
\renewcommand{\cfttabaftersnum}{.}
\renewcommand*\cfttabpresnum{Tablo~}
\settowidth{\cfttabnumwidth}{\cfttabpresnum}
\renewcommand{\cfttabaftersnumb}{\quad~~}
\setlength{\cftbeforelottitleskip}{10mm}
\setlength{\cftafterlottitleskip}{1\baselineskip}
\setlength{\cftbeforetabskip}{\cftbeforechapskip}

\begin{singlespace}
\listoftables
\end{singlespace}
\clearpage
%-------------------------

\pagenumbering{arabic}

\chapter{CHAPTER}
\section{Section}
\lipsum[1]
\begin{figure}[h!]
  \centering
  %\includegraphics[height=6cm]{http://www.knittedhome.com/communities/5/004/012/872/235/images/4628207884.jpg}
  \caption{Sample Image}
  \label{fig:Sample}
\end{figure}

\begin{figure}[htp!]
  \centering
  %\includegraphics[height=6cm]{http://www.knittedhome.com/communities/5/004/012/872/235/images/4628207884.jpg}
  \caption{Sample Image 2}
  \label{fig:Sample 2}
\end{figure}

\subsection{Subsection}
\lipsum[2-3]
\begin{table}[htp]
\centering
\begin{tabular}{lllll}
DF & DF &    & S  & S  \\
   & S  & DF &    &    \\
   & S  &    & DF &    \\
   & SD &    &    & DF
\end{tabular}
\caption{Deneme Tablosu Bir}
\label{my-label}
\end{table}

\begin{table}[htp]
\centering
\begin{tabular}{lllll}
DF & DF &    & S  & S  \\
   & S  & DF &    &    \\
   & S  &    & DF &    \\
   & SD &    &    & DF
\end{tabular}
\caption{Deneme Tablosu İki}
\label{my-label}
\end{table}
\subsubsection{Subsubsection}
\lipsum[3-5]
\chapter{CHAPTER}
\section{Section}
\lipsum[1]
\begin{figure}[htp!]
  \centering
  %\includegraphics[height=6cm]{http://www.knittedhome.com/communities/5/004/012/872/235/images/4628207884.jpg}
  \caption{Sample Image}
  \label{fig:Sample}
\end{figure}

\begin{figure}[htp!]
  \centering
  %\includegraphics[height=6cm]{http://www.knittedhome.com/communities/5/004/012/872/235/images/4628207884.jpg}
  \caption{Sample Image 2}
  \label{fig:Sample 2}
\end{figure}

\subsection{Subsection}
\lipsum[2-3]
\begin{table}[htp]
\centering
\begin{tabular}{lllll}
DF & DF &    & S  & S  \\
   & S  & DF &    &    \\
   & S  &    & DF &    \\
   & SD &    &    & DF
\end{tabular}
\caption{Deneme Tablosu Bir}
\label{my-label}
\end{table}

\begin{table}[htp]
\centering
\begin{tabular}{lllll}
DF & DF &    & S  & S  \\
   & S  & DF &    &    \\
   & S  &    & DF &    \\
   & SD &    &    & DF
\end{tabular}
\caption{Deneme Tablosu İki}
\label{my-label}
\end{table}
\subsubsection{Subsubsection}
\lipsum[3-5]
%.........................

\end{document}

Some notes. Never use [h!] for a float, better [!htp]; similarly, never use [] that is the same as [tp] but with an annoying warning.

If you load babel as

\usepackage[english,turkish,shorthands=:!]{babel}

then you don't need to issue \selectlanguage{turkish}. It could be as well

\usepackage[main=turkish,english,shorthands=:!]{babel}

enter image description here

  • Thank you, it is working good! But, why did you add \usepackage{etoolbox} command? I didn't add this but the codes still working? – volkan Jul 20 '18 at 12:22
  • @volkanyazici The newtxtext package loads etoolbox; it would be necessary in case you change your mind about fonts, so better loading it explicitly (\usepackage{etoolbox} does essentially nothing if the package has already been loaded). – egreg Jul 20 '18 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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