如何改变图片上的间距?
这是我的 MWE:
\documentclass[floatsubsection,equationsubsection,14pt,nocolumnsxix]{eskdtext}
\usepackage[T1,T2A]{fontenc}
\usepackage[cp1251]{inputenc}
\usepackage{titlesec}
\titleformat*{\section}{\bf}
\titleformat*{\subsection}{\bf}
\titlespacing*{\section}{13pt}{8mm}{8mm}
\titlespacing*{\subsection}{0pt}{15mm}{15mm}
\parindent=1,25cm
\linespread{1.25}
\usepackage[titles]{tocloft}
\cftsetindents{section}{0.5in}{0.5in}
\cftsetindents{subsection}{0.5in}{0.5in}
\renewcommand{\cftsecfont}{\mdseries}
\renewcommand{\cftsecpagefont}{\mdseries}
\begin{document}
\tableofcontents
dfgfgdfgsergtfsr
srthg
srdth
ert
h
resth
we
rth
wer
th
erth
d
\section{Slef}
\subsection{dfgsertgsergRERE}
\section{FCYITH}
\section*{Dnishe}
\addcontentsline{toc}{section}{Dnishe}
\end{document}
答案1
以下是如何从目录中删除虚线,至少对于文章类来说。
\documentclass{article}
\makeatletter
\renewcommand*\l@subsection[2]{%
\ifnum \c@tocdepth >\@ne
\addpenalty\@secpenalty
\addvspace{\z@ \@plus\p@}% vertical space (1.0em \@plus\p@ for section}
\setlength\@tempdima{2.3em}% #3 from \@dottedtocline
\begingroup
\parindent 1.5em\relax% #2 from \@dottedtocline
\rightskip \@pnumwidth
\parfillskip -\@pnumwidth
\leavevmode \bfseries
\advance\leftskip\@tempdima
\hskip -\leftskip
#1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
\endgroup
\fi}
\makeatother
\begin{document}
\tableofcontents
\section{Slef}
\subsection{dfgsertgsergRERE}
\section{FCYITH}
\section*{Dnishe}
\addcontentsline{toc}{section}{Dnishe}
\end{document}
这将替换(来自 article.cls)
\newcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}}
其中(来自 source2e.pdf)
\@dottedtocline{⟨level⟩}{⟨indent⟩}{⟨numwidth⟩ }{⟨title⟩}{⟨page⟩}