将附录的章节标题放在页面中间

将附录的章节标题放在页面中间

有没有办法将附录的章节标题放在页面中间,然后开始章节的内容(在我的情况下,内容是一个表格,对于一页来说太大了,所以它会自动从下一页开始)。例如,下面是我的代码(它是我主代码的 \input{} 之一)

\documentclass[a4paper, 12pt]{report}
\usepackage[titletoc]{appendix}
\begin{document}
\cleardoublepage \addcontentsline{toc}{chapter}{Table of Contents} \tableofcontents
\cleardoublepage\addcontentsline{toc}{chapter}{List of Tables} \listoftables
\cleardoublepage\addcontentsline{toc}{chapter}{List of Figures} \listoffigures
\doublespacing
\begin{appendices}
\chapter{First chapter heading}\label{appendix: AppendixA: 1st Chapter heading}
\input{First chapter table which overflow the page.tex}
\chapter{Second chapter heading}\label{appendix: AppendixB: 2nd Chapter heading}
\input{Something_else.tex}
\chapter{Third chapter heading}\label{appendix: AppendixC: 3rd Chapter heading}
\input{Something_else.tex}
\chapter{Fourth chapter heading}\label{appendix: AppendixD: 4th Chapter heading}
\input{Something_else.tex}
\chapter{Fifth chapter heading}\label{appendix: AppendixE: 5th Chapter heading}
\input{Something_else.tex}
\end{appendices} 
\end{document} 

从上面的代码中,是否可以将“第一章标题”,“第二章标题”等放在页面中间,同时可以在目录中显示?

请给我建议,提前谢谢您!

汤米

答案1

您可以使用titlesec包并在附录环境中对章节进行新的定义:

\documentclass[a4paper, 12pt]{report}
\usepackage[titletoc]{appendix}
\usepackage{lipsum}
\usepackage{titlesec}
\begin{document}
\cleardoublepage \addcontentsline{toc}{chapter}{Table of Contents} \tableofcontents
\cleardoublepage\addcontentsline{toc}{chapter}{List of Tables} \listoftables
\cleardoublepage\addcontentsline{toc}{chapter}{List of Figures} \listoffigures


\begin{appendices}
\titleformat{\chapter}[display]
  {\normalfont\huge\bfseries\centering}
  {\chaptertitlename\ \thechapter}{20pt}{\Huge}
\chapter{First chapter heading}\label{appendix: AppendixA: 1st Chapter heading}
\lipsum[1-4]
\chapter{Second chapter heading}\label{appendix: AppendixB: 2nd Chapter heading}
\lipsum[1-2]
\end{appendices}

\chapter{test normal chapter}
\lipsum[1-4]
\end{document} 

结果:

在此处输入图片描述

在此处输入图片描述

在此处输入图片描述

在此处输入图片描述

相关内容