我们怎样才能在每个章节前插入章节号章节标题,以便该页面上没有页码,但页码将继续出现在章节中。我正在使用报告类文件。
答案1
修补程序\chapter
将调用\thispagestyle{empty}
而不是\thispagestyle{plain}
。
\documentclass{report}
\usepackage{etoolbox}
\patchcmd{\chapter}{\thispagestyle{plain}}{\thispagestyle{empty}}{}{}
% the next two lines are just for the example
\usepackage{lipsum} % dummy text
\usepackage[a6paper]{geometry} % small page
\begin{document}
\chapter{Title}
\lipsum[1-3]
\end{document}
答案2
也许您想将章节标题放在单独的页面上,例如\part
?
\documentclass[12pt, a4paper, twoside, openright]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}%
\usepackage{fourier, erewhon, cabin}
\usepackage{microtype}%
\usepackage{lipsum}%
\usepackage[clearempty, indentfirst]{titlesec}
\titleformat{\chapter}[display]{\thispagestyle{empty}\sffamily\bfseries\Huge\centering}{\thechapter}{1em}{\textls[40]}[\clearpage]
\titleformat{name=\chapter, numberless}[block]{\thispagestyle{empty}\sffamily\bfseries\huge\centering}{}{0pt}{\textls[40]}
\begin{document}
\tableofcontents
\chapter{Introduction}
\lipsum
\end{document}
答案3
\documentclass{report}
\usepackage{titlesec}
\usepackage{lipsum}
\titleformat{\chapter}[hang]{\huge\bfseries}{\thechapter}{20pt}{}
\begin{document}
\chapter{Chapter title}
\label{cha:chapter-title}
\thispagestyle{empty}
\lipsum
\end{document}