我希望在零件的第一页显示零件目录,但我希望能够更改零件标题的样式。有人能帮我吗?
我需要运行这个:
\documentclass[12pt,openany]{book}
\usepackage[a4paper]{geometry}
\geometry{hmargin=2cm,vmargin=2cm}
\usepackage{libertine}
\usepackage{hyperref}
\usepackage{array}
\usepackage{txfonts}
\usepackage{afterpage}
\usepackage{eurosym}
\usepackage{caption}
\usepackage{wrapfig}
\usepackage{chemist}
%%%Gestion du Français et des accents
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage{textcomp}
%%%Interligne
\usepackage{booktabs}
\usepackage{setspace}
%%%Page Blanche
\newcommand\myemptypage{
\null
\thispagestyle{empty}
\addtocounter{page}{0}
\newpage
}
%%%Gestion graphique
\usepackage[pdftex]{graphicx}
\usepackage{multicol}
\usepackage{tikz}
%%%Mise en page des sommaires
\usepackage{titletoc,titlesec}
\usepackage{minitoc}
%%%En-tete et pied de page
\usepackage{fancyhdr}
\usepackage{lastpage}
\fancypagestyle{plain}{
\fancyhf{}
\fancyfoot[C]{\thepage\,$|$\,\pageref{LastPage}}}
\pagestyle{plain}
\renewcommand{\headrulewidth}{0pt}
%%%Mise en forme table des titres
%Titre des parties
\renewcommand{\thepart}{\arabic{part}}
%\titleformat{\part}[display]{\centering\normalfont\scshape\bfseries\LARGE}{\rule[3pt]{0.15\linewidth}{3pt}\quad Chapitre~\thepart \quad\rule[3pt]{0.15\linewidth}{3pt}}{20pt}{}[]
%Titre des chapitres
\titleclass{\chapter}{straight}
\titleformat{\chapter}[display]
{\normalfont\LARGE\scshape\centering}
{\parttitle}{}{}
\titlespacing{\chapter}{0pt}{0pt}{20pt}
%Titre des sections
\renewcommand{\thesection}{\thepart.\arabic{section}}
\titleformat{\section}[block]{\normalfont\Large\scalefont{1.1}\scshape\bfseries}{\thesection}{1em}{}{}
\titlespacing*{\section}{0pt}{10pt}{10pt}
%Titre des sous-sections
\titleformat{\subsection}[block]
{\normalfont\Large\scshape}{\thesubsection}{1em}{}{}
\titlespacing*{\subsection}{0pt}{10pt}{10pt}
%%%Mise en page des sommaires
\usepackage{titlesec,titletoc}
\usepackage{etoolbox}
\renewcommand{\hrulefill}{\leavevmode\leaders\hrule height 0pt \hfill\kern0pt}
%Partie dans le sommaire
\titlecontents{part}[60pt]{\fontsize{15}{20}\selectfont\scshape\bfseries\contentslabel[Chapitre~\thecontentslabel]{60pt}}{}{}
\contentsfinish
%Chapitre dans le sommaire
\titlecontents{chapter}[0pt]
{\fontsize{15}{20}\selectfont\bfseries\scshape\contentslabel[\thecontentslabel]{100pt}}{}{}
{\normalsize\normalfont\hrulefill\thecontentspage}{}{}
\contentsfinish
%Section dans le sommaire
\titlecontents{section}[30pt]
{\fontsize{14}{15}\selectfont\scshape\contentslabel{30pt}}{}{}
{\normalsize\hrulefill\thecontentspage}{}{}
\contentsfinish
%Sous-section dans le sommaire
\titlecontents{subsection}[40pt]
{\fontsize{12}{15}\selectfont\contentslabel{40pt}}{}{}
{\normalsize\hrulefill\normalfont\thecontentspage}{}{}
\contentsfinish
%Sous-sous-section dans le sommaire
\titlecontents{subsubsection}[50pt]
{\fontsize{12}{15}\selectfont\contentslabel{50pt}}{}{}
{\normalsize\hrulefill\normalfont\thecontentspage}{}{}
\contentsfinish
%Changer titre du sommaire
\addto\captionsfrench{
\renewcommand{\contentsname}
{Table des matières}}
\renewcommand{\beforeparttoc}{\empty}
\makeatletter
\def\@endpart{\vskip50pt}
\makeatother
\begin{document}
\doparttoc[n]
\tableofcontents
\part{Name of part 1}
\part{Name of part 2}
\parttoc
\chapter{This is the Chapter 1}
\section{Section 1}
\subsection{Subsection 1}
\subsection{Subsection 2}
\subsection{Subsection 3}
\section{Section 2}
\subsection{Subsection 1}
\subsection{Subsection 2}
\subsection{Subsection 3}
\section{Section 3}
\subsection{Subsection 1}
\subsection{Subsection 2}
\subsection{Subsection 3}
\section*{Section 4 not in TOC}
\end{document}
并能够使用
%\titleformat{\part}[display]{\centering\normalfont\scshape\bfseries\LARGE}{\rule[3pt]{0.15\linewidth}{3pt}\quad Chapitre~\thepart \quad\rule[3pt]{0.15\linewidth}{3pt}}{20pt}{}[]
有这种风格的 mixte 与下面的 parttoc
而不是这种风格的标题