答案1
下面是模拟此布局的代码:
\documentclass[11pt,]{book}
\usepackage[utf8]{inputenc}
\usepackage{fourier, erewhon, cabin}
\usepackage[left=3.5cm]{geometry}
\usepackage{titlesec}
\titleformat{\chapter}[display]{\filcenter\titlerule[1.5pt]\sffamily\bfseries\Huge\bigskip}{\thechapter}{1.5pc}{}[\vspace{2ex}{\titlerule[1.5pt]}]
\titlespacing*{\chapter}{-0.5\marginparwidth}{50pt}{40pt}
\titleformat{\section}[hang]{\sffamily\bfseries\LARGE}{\thesection}{0.8em}{}
\titlespacing*{\section}{-0.5\marginparwidth}{3.5ex}{2.3ex}%
\begin{document}
\setcounter{chapter}{1}
\chapter{Vector geometry}
\section{Affine spaces}
In Chapter 1, we explained how Euclid built up the whole of geometry from a small number of fundamental assumptions or \emph{axioms}. Following Euclid’s method, we stated nine axioms and from them developed the theory of \emph{vectors}.
\end{document}
答案2
你的意思是
\documentclass{book}
\usepackage{titlesec}
\titleformat{\chapter}[display]{}{\hrule}{0pt}{\center\bfseries\thechapter\\[3ex]}[\endcenter\hrule]
\begin{document}
\chapter{test}
alkasdjalsk laskj laskj ldsakj dl
\end{document}
不过,你必须根据自己的使用情况进行调整,例如,对于无衬线字体,你可以\bfseries
用\sffamily
\documentclass{book}
\usepackage{titlesec}
\titleformat{\chapter}[display]{}{\hrule}{0pt}{\center\sffamily\thechapter\\[3ex]}[\endcenter\hrule]
\begin{document}
\chapter{test}
alkasdjalsk laskj laskj ldsakj dl
\end{document}
给予