不使用回憶錄類如何實現這一章節風格?

不使用回憶錄類如何實現這一章節風格?

由於fncychap沒有這樣的章節樣式,並且使用memoir類別會與我目前的設定(類別)產生很多衝突book,如何製作這種樣式(也許使用套件titlesec)?

目錄和章節樣式:

在此輸入影像描述我

這是我的章節設定:

\usepackage[ ]{titlesec}  
\titleformat{\chapter}[display]
{\normalfont\LARGE\bfseries }{\chaptertitlename\  \thechapter}{10pt}{\huge}
\titlespacing*{\chapter}{0pt}{40pt}{40pt}  % left, vertical, skip

答案1

這是一種方法titlesec;我還用它microtype來分隔小型大寫字母。

\documentclass{book}
\usepackage{titlesec,microtype}

\titleformat{\chapter}[display]
 {\normalfont\normalsize\scshape}
 {\makebox[\textwidth]{\titlerule[0.8ex]\quad\textls{\chaptername}\ \thechapter\quad\titlerule[0.8ex]}}
 {1ex}
 {\titlerule\vspace{1ex}\centering\huge\textls[50]}
 [\titlerule]

\titleformat{name=\chapter,numberless}[display]
 {\normalfont\normalsize\scshape}
 {\makebox[\textwidth]{\titlerule[0.8ex]}}
 {1ex}
 {\titlerule\vspace{1ex}\centering\huge\textls[50]}
 [\titlerule]

\begin{document}

\chapter*{Contents}

\chapter{FETCH Automated Verification and Validation}

\end{document}

無數的章節

編號章節

答案2

另一種使用titlesecwithexplicit選項的方法:

\documentclass{book}

\usepackage{lipsum} % just for the example

\def\hrulefillthick{\leavevmode\leaders\hrule height3pt\hfill\kern0pt}

\usepackage[explicit]{titlesec}

\titleformat{\chapter}[display]
{\normalfont\normalsize\scshape}
{\hrulefillthick\hspace*{.5cm}\chaptertitlename\  \thechapter\hspace*{.5cm}\hrulefillthick}
{5pt}
{\titlerule\centering\huge#1}
[\titlerule]

\titleformat{name=\chapter,numberless}[display]
{\normalfont\normalsize\scshape}
{\hrulefillthick}
{5pt}
{\titlerule\centering\huge#1}
[\titlerule]

\begin{document}

\tableofcontents

\chapter{FETCH Automated Verification and Validation}
\lipsum[1-3]
\end{document}

在此輸入影像描述

在此輸入影像描述

相關內容