我想知道有人能帮我吗,我想在页面中央单独设置一个章节标题。所有其他章节将保持正常,文本在同一页上。
\documentclass[a4paper, 12pt, oneside]{book}
\usepackage[a4paper,top=40mm, bottom=40mm, left=40mm, right=30mm]{geometry}
\usepackage[english]{babel}
\begin{document}
%preambles
\chapter{introduction}
some text here
\section{name}
some text here
\chapter{background}
some text here
\section{name}
some text here
\chapter*{discussion}% I would like for this chapter heading to be centred on a single page and the section to go to next page
some text here
\section{name}
some text here
\end{document}
答案1
我认为以下内容可以实现您想要的效果:替换指令
\chapter*{discussion}
和
\part*{discussion}
\markboth{}{}
这会将“讨论”一词放在页面的中间,水平和垂直均居中。
此后,继续照常进行\chapter
。\section
完整的 MWE:
\documentclass[a4paper, 12pt, oneside]{book}
\usepackage[vmargin=40mm, left=40mm, right=30mm]{geometry}
\usepackage[english]{babel}
\usepackage{lipsum}
\begin{document}
%preambles
\chapter{introduction}
some text here
\section{name}
\lipsum[1-5]
\chapter{background}
some text here
\section{name}
\lipsum[1-5]
\part*{discussion}
%\markboth{}{}
\chapter{details}
some text here
\section{whatever}
\lipsum[1-5]
\end{document}