答案1
anyfontsize
以下是使用(针对字体尺寸为 80)、tabularray
和titlesec
(针对标题格式)的解决方案:
\documentclass{book}
\usepackage{blindtext}% <--- for testing purpose only
\usepackage{anyfontsize}
\usepackage{tabularray}
\usepackage{xcolor}
\definecolor{AB_gray_med}{gray}{0.75}
\usepackage[explicit]{titlesec}
\titleformat{\chapter}[hang]{}{}{0pt}{\begin{tblr}{
vline{2}={AB_gray_med, wd=4pt},
colspec={rX},
colsep=10pt,
column{1}={leftsep=0pt, font=\fontsize{80}{0}\selectfont \bfseries},
column{2}={rightsep=0pt, font=\LARGE\bfseries},
}
\SetCell[r=1]{h,r}\thechapter & #1
\end{tblr}}
\titleformat{name=\chapter,numberless}{}{}{0pt}{\LARGE\bfseries #1}
\begin{document}
\tableofcontents
\chapter{My Chapter Title}
\blindtext% <--- for testing purpose only
\chapter{The need for climate change adaptation in the UK}
\blindtext% <--- for testing purpose only
\end{document}
无数字标题:
单行标题:
标题有两行: