图表元素之间的间距

图表元素之间的间距

在此处输入图片描述

你好!在图表列表和表格列表中,属于其他章节的元素之间有一个额外的空格。我想删除图表和表格列表的额外空间。我该如何解决这个问题?谢谢。

\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}

答案1

您需要修补\@chapter以使其不发出\addvspace命令。

但这需要在加载之前完成hyperref

我对您的序言进行了一些重新组织,以分离包加载和设置。

\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}

一些注意事项。永远不要使用[h!]来表示浮点数,最好是[!htp];同样,永远不要使用[],它与 相同,[tp]但会发出令人讨厌的警告。

如果您加载babel

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

那么你就不需要发出\selectlanguage{turkish}。也可以

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

在此处输入图片描述

相关内容