목차 페이지의 헤더를 삭제하고 제목: 목차만 유지하고 싶습니다.
이
내 코드는 다음과 같습니다
\documentclass{book}
\usepackage{fourier}
\usepackage{tikz}
\usepackage[explicit]{titlesec}
\usepackage{titletoc}
\usepackage{lipsum}
\usetikzlibrary{shadows.blur}
\usepackage{calc}
\usepackage[utf8]{inputenc}
\usepackage[frenchb]{babel}
\usepackage[french]{minitoc}
\usepackage{titletoc}
\usepackage{fancyhdr}
%chapter
\renewcommand\thechapter{\arabic{chapter}}
\titleformat{\chapter}
{\fontfamily{}\Huge\filleft}
{}
{20pt}
{\begin{tikzpicture}[remember picture,overlay]
\draw [line width=2pt,blue] (-13,0) -- (1.5,0);
\draw [line width=2pt,blue] (-13,4) -- (1.5,4);
\draw [line width=2pt,blue] (1.5,4) -- (1.5,0);
%
\node[color=blue,xshift=-11cm,yshift=4.5cm,font=\fontsize{20}{20}\selectfont] {CHAPITRE};
%
\draw [fill=blue,blue,text=white] (-13,0) rectangle (-9cm,4cm) node[pos=.5,font=\fontsize{100}{100}\fontfamily{pag}\bfseries\selectfont] {\thechapter}; % le numéro du chapitre
\node[anchor=north east,align=right,inner xsep=5pt,text=blue] at (2.4,4.1)
{\parbox{.9\textwidth}{\raggedright#1}};% le titre du partie
\end{tikzpicture}%
}
\begin{document}
\tableofcontents
\chapter{A chapter}
\section{Section}
\section{Section 2}
\section{test}
\section{abc}
\chapter{Second chapter}
\section{Section}
\section{Section 2}
\section{test}
\section{abc}
\chapter{Second chapter}
\section{Section}
\section{Section 2}
\section{test}
\section{abc}
\chapter{Second chapter}
\section{Section}
\section{Section 2}
\section{test}
\chapter{Second chapter}
\section{Section}
\section{Section 2}
\section{test}
\section{abc}
\chapter{Second chapter}
\section{Section}
\section{Section 2}
\section{test}
\section{abc}
\chapter{Second chapter}
\section{Section}
\section{Section 2}
\section{test}
\section{abc}
\chapter{Second chapter}
\end{document}
답변1
목차 제목의 형식을 지정하려면 키를 사용하여 번호가 없는 장의 형식을 재정의하면 됩니다 numberless
. 헤더에 관해서는 \markboth{}
toc 명령 바로 뒤에 명령을 추가하고 전체를 그룹에 넣습니다. 테스트 목적으로 패키지를 추가했습니다 lipsum
. 제거할 수 있습니다.
\documentclass[french]{book}
\usepackage{fourier}
\usepackage{tikz}
\usepackage[explicit]{titlesec}
\usepackage{titletoc}
\usepackage{lipsum}
\usetikzlibrary{shadows.blur}
\usepackage{calc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[french]{minitoc}
\usepackage{titletoc}
\usepackage{fancyhdr}
%chapter
\renewcommand\thechapter{\arabic{chapter}}
\titleformat{\chapter}
{\fontfamily{}\Huge\filleft}
{}
{20pt}
{\begin{tikzpicture}[remember picture,overlay]
\draw [line width=2pt,blue] (-13,0) -- (1.5,0);
\draw [line width=2pt,blue] (-13,4) -- (1.5,4);
\draw [line width=2pt,blue] (1.5,4) -- (1.5,0);
%
\node[color=blue,xshift=-11cm,yshift=4.5cm,font=\fontsize{20}{20}\selectfont] {CHAPITRE};
%
\draw [fill=blue,blue,text=white] (-13,0) rectangle (-9cm,4cm) node[pos=.5,font=\fontsize{100}{100}\fontfamily{pag}\bfseries\selectfont] {\thechapter}; % le numéro du chapitre
\node[anchor=north east,align=right,inner xsep=5pt,text=blue] at (2.4,4.1)
{\parbox{.9\textwidth}{\raggedright#1}};% le titre du partie
\end{tikzpicture}%
}
\titleformat{name=\chapter, numberless}
{\fontfamily{}\Huge\filright}
{}
{0pt}
{\color{blue}#1}
\begin{document}
\bgroup
\tableofcontents
\markboth{}
\egroup
\chapter{A chapter}
\section{Section}
\lipsum[1-30]
\section{Section 2}
\section{test}
\section{abc}
\lipsum
\chapter{Second chapter}
\section{Section}
\section{Section 2}
\section{test}
\section{abc}
\chapter{Second chapter}
\section{Section}
\section{Section 2}
\section{test}
\section{abc}
\chapter{Second chapter}
\section{Section}
\section{Section 2}
\section{test}
\chapter{Second chapter}
\section{Section}
\section{Section 2}
\section{test}
\section{abc}
\chapter{Second chapter}
\section{Section}
\section{Section 2}
\section{test}
\section{abc}
\chapter{Second chapter}
\section{Section}
\section{Section 2}
\section{test}
\section{abc}
\chapter{Second chapter}
\end{document}