我调整了章节标题的格式,例如原始问题(scrbook
类)。我正在使用\flushbottom
选项。例如,当图表列表跨越多页时,章节标题的垂直位置会稍微改变。我尝试\parskip
根据这个问题。这没有按预期工作(见图)。有没有办法不使用 来修复垂直位置\raggedbottom
?谢谢!
梅威瑟:
\documentclass[
a4paper,
11pt,
listof=totoc,
bibliography=totoc,
parskip=half,
openany,
]{scrbook}
\usepackage{etoolbox}
\usepackage[no-math]{fontspec}
\PassOptionsToPackage{no-math}{fontspec}
\usepackage[showframe,twoside]{geometry}
\usepackage{blindtext}
\usepackage[pdfpagelayout=TwoColumnLeft]{hyperref}
\KOMAoptions{chapterprefix=true}
\renewcommand{\raggedchapter}{\raggedleft}
\renewcommand{\chapapp}{}
\RedeclareSectionCommand[
prefixfont = \bfseries\fontsize{50}{52}\selectfont,
font = \Huge,
beforeskip = 40pt,
innerskip = -5pt,
afterskip = 40pt,
]{chapter}
\makeatletter
\renewcommand*\chapterlineswithprefixformat[3]{%
\Ifstr{#1}{chapter}
{\IfArgIsEmpty{#2}
{{\usekomafont{#1prefix}{%
\mbox{}%
\setlength{\@tempskipa}{\csname scr@#1@innerskip\endcsname}\chapterheadmidvskip
}}#3%
}% Unnumbered chapter headings
{#2#3}% Numbered chapter headings
}
{#2#3}% Other headings using style=chapter
}
\makeatother
% Fix position of chapter heading (not working)
\makeatletter
\patchcmd{\@makechapterhead}
{\parindent}
{\parskip=\z@skip\parindent}
{}{}
\makeatother
\begin{document}
\tableofcontents
\listoffigures
\blindtext[4]
\begin{figure}[htbp]
\caption{Test figure}
\end{figure}
\end{document}