一切都在问题之中……
\documentclass[a4paper,12pt,oneside]{book}
%
\usepackage[francais]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{subfig}
\usepackage{fancyhdr}
\usepackage[Lenny]{fncychap}
\usepackage[francais]{minitoc}
\usepackage[section]{placeins}
\usepackage{titletoc}%
\usepackage{chngcntr}
\usepackage[subfigure]{tocloft}
% remove chapters number
\counterwithout{section}{chapter}
% num depth of toc
\setcounter{secnumdepth}{5}
% depth of toc
\setcounter{tocdepth}{4}
% minitoc
\setcounter{minitocdepth}{2}
% add dots
\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}}
% add chapter
\newlength\mylength
\renewcommand\cftchappresnum{\chaptername~}
\renewcommand\cftchapaftersnum{~~-~~}
\settowidth\mylength{\cftchappresnum\cftchapaftersnum\quad}
\addtolength\cftchapnumwidth{\mylength}
\begin{document}
\dominitoc
\tableofcontents
\chapter{blablabla}
\minitoc
\section{myfirstsection}
\subsection{blabla}
\section{mysecondsection}
\subsection{blabla}
\end{document}
我也尝试添加这个但不影响结果:
\setlength{\mtcindent}{24pt}
\renewcommand{\mtcfont}{\small\rm}
\renewcommand{\mtcSfont}{\small\bf}
我为我的糟糕英语提前致歉!
谢谢 !
答案1
像这样: minitoc 和 tocloft 包之间存在不良交互,因此我有:
\renewcommand{\cftsecfont}{\small\bfseries}
完整代码:
\documentclass[a4paper,12pt,oneside]{book}
%
\usepackage[francais]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{subfig}
\usepackage{fancyhdr}
\usepackage[Lenny]{fncychap}
\usepackage[francais]{minitoc}
\usepackage[section]{placeins}
\usepackage{titletoc}%
\usepackage{chngcntr}
\usepackage[subfigure]{tocloft}
% remove chapters number
\counterwithout{section}{chapter}
% num depth of toc
\setcounter{secnumdepth}{5}
% depth of toc
\setcounter{tocdepth}{4}
% minitoc
\setcounter{minitocdepth}{2}
% add dots
\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}}
% add chapter
\newlength\mylength
\renewcommand\cftchappresnum{\chaptername~}
\renewcommand\cftchapaftersnum{~~-~~}
\settowidth\mylength{\cftchappresnum\cftchapaftersnum\quad}
\addtolength\cftchapnumwidth{\mylength}
\renewcommand{\cftsecfont}{\small\bfseries}
%\renewcommand{\cftsubsecfont}{\small\bfseries}
\begin{document}
\dominitoc
\tableofcontents
\chapter{blablabla}
\minitoc
\section{myfirstsection}
\subsection{blabla}
\section{mysecondsection}
\subsection{blabla}
\end{document}