![LaTeX 中的精美章节样式](https://linux22.com/image/344546/LaTeX%20%E4%B8%AD%E7%9A%84%E7%B2%BE%E7%BE%8E%E7%AB%A0%E8%8A%82%E6%A0%B7%E5%BC%8F.png)
答案1
这是一个使用 block
样式的解决方案。如果您使用其他基本字体大小或其他字体,则可能需要调整某些参数值:
\documentclass[a4paper, 0pt,french]{book}%
\usepackage{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}%
\usepackage{fourier, erewhon, cabin}
\usepackage{microtype}
\usepackage[pagestyles, clearempty, explicit]{titlesec}
\usepackage{eqparbox}
\usepackage{lipsum}%
\titleformat{\chapter}[block]{}{\eqmakebox[chap]{\Large\MakeUppercase{\sffamily\lsstyle\chaptername} %
\raisebox{-0.6\height}{\fontsize{50pt}{50pt}\selectfont\thechapter}\quad}}%
{0pt}{\huge\bfseries\raisebox{1ex}{\parbox[t]{\dimexpr\textwidth-\eqboxwidth{chap}\relax}{\titlerule[2pt]\vspace{1.25ex}#1}}}
\titlespacing*{\chapter}{0pt}{-32pt}{48pt}%
\begin{document}
\setcounter{chapter}{1}
\chapter{Problème parabolique\\ semi-linéaire dégénéré}
\lipsum[1-6]
\end{document}
答案2
您可以使用 来完成此操作titlesec
,但我发现它相当丑陋。
\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage{titlesec}
\usepackage{graphicx}
\titleformat{\chapter}[block]
{\Large\bfseries}
{\raisebox{-\height}{\sffamily\scriptsize\MakeUppercase{\chaptertitlename}}%
\space\raisebox{-\height}{\bigchapternumber}\space}
{0pt}
{\printtitle}
\newlength\pretitlewidth
\newcommand\bigchapternumber{\resizebox{24pt}{!}{\mdseries\thechapter}}
\newcommand{\printtitle}[1]{%
\settowidth{\pretitlewidth}{%
{\sffamily\scriptsize\MakeUppercase{\chaptertitlename}}\space
{\bigchapternumber}\space
}%
\parbox[t]{\dimexpr.8\textwidth-\pretitlewidth}{%
\linespread{1.5}\selectfont
\hrule depth 1pt
\vspace{3ex}
\raggedright\bfseries #1
}%
}
\begin{document}
\setcounter{chapter}{1}
\chapter{Problème parabolique semi-linéaire dégénéré}
\end{document}