如何設定章節標題的垂直邊距?

如何設定章節標題的垂直邊距?

我目前不喜歡文檔的排版。在我的雙面文件中,我希望章節標題在出現之前沒有垂直空間。

第二頁的文字應從第 1 行開始,如果可能的話,應從第 2 行開始。

我的文件序:

\documentclass[12pt,parskip=half,a4paper,twoside]{scrreprt}
[..]
\usepackage{fancyhdr}
\usepackage{titlesec}
[..]
\titleformat{\chapter}[hang]{\normalfont\huge\bfseries}{\thechapter}{1em}{\Huge}
\titlespacing*{\chapter}{0pt}{0pt}{1em}

\titleformat{\section}{\normalfont\Large\bfseries}{\thesection}{1em}{}
\titlespacing*{\section}{0em}{1em}{0em}

\titleformat{\subsection}{\normalfont\large\bfseries}{\thesubsection}{1em}{}
\titleformat{\subsubsection}{\normalfont\normalsize\bfseries}{\thesubsubsection}{1em}{}
\titleformat{\paragraph}[runin]{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}
\titleformat{\subparagraph}[runin]{\normalfont\normalsize\bfseries}{\thesubparagraph}{1em}{}

\begin{document}
[..]
\end{document}

利潤

答案1

你可以嘗試使用

\renewcommand{\chapterheadstartvskip}{\vspace*{-2\baselineskip}}

在你的文件序言中。

使用時標題安全像你一樣,寫

\titlespacing*{\chapter}{0pt}{-2\baselineskip}{1em}

相關內容