章節標題更改為居中對齊,並且沒有“章節”一詞

章節標題更改為居中對齊,並且沒有“章節”一詞

我希望章節標題保持1. chapter_name一致center。我怎樣才能得到這個?我在網路上搜尋了答案,但我只能得到單獨的答案,但不能得到這兩個要求的組合答案。請幫忙並提前致謝...

答案1

bookreport類,使用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}

未編號的章節

在此輸入影像描述

編號章節

在此輸入影像描述

相關內容