
我希望章節標題保持1. chapter_name
一致center
。我怎樣才能得到這個?我在網路上搜尋了答案,但我只能得到單獨的答案,但不能得到這兩個要求的組合答案。請幫忙並提前致謝...
答案1
與book
或report
類,使用titlesec
包,這裡是一個例子:
\documentclass{book}
\usepackage{titlesec}
\titleformat{\chapter}[block]
{\normalfont\Huge\bfseries\filcenter}
{\thechapter.}
{10pt}
{\Huge}
\titleformat{name=\chapter,numberless}[block]
{\normalfont\Huge\bfseries\filcenter}
{}
{0pt}
{\Huge}
\titlespacing*{\chapter} {0pt}{20pt}{20pt} %% adjust these as you like
\titlespacing*{name=\chapter,numberless} {0pt}{20pt}{20pt} %% adjust these as you like
\begin{document}
\tableofcontents
\chapter{Introduction}
\end{document}
未編號的章節
編號章節