如何在自定义宏中删除章节标题的顶部边距?

如何在自定义宏中删除章节标题的顶部边距?

我创建了一个自定义边距,用于自动创建书籍数字化过程中某些部分的章节。我希望能够删除章节标题的顶部边距,因为我觉得我不需要它。但是,我做不到。最小工作示例:

\documentclass[10pt,a4paper]{book}
% Packages
\usepackage[margin=1in]{geometry}
\usepackage{fontspec}
\usepackage{titlesec}
\usepackage[vietnamese=nohyphenation]{hyphsubst}
\usepackage[vietnamese]{babel}
\usepackage{indentfirst}
% The specific macro that I use
\newcommand{\house}[3]{
    \chapter[#1]{#1 \\ #2}
    \vspace{-20pt}
    \noindent
    \Large{\textbf{(#3)}}}
\begin{document}
\house{HỌ HỒNG BÀNG}{鴻龐氏}{2879 -- 258 trước Tây lịch}
\end{document}

答案1

以下是我的做法。

% Title Format
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{10pt}{\Huge\MakeUppercase}
\titlespacing{\chapter}{0pt}{20pt}{10pt}
% Macros
\newcommand{\house}[3]{
    \chapter[#1]{#1 \\ #2}
    \noindent
    \Large{\textbf{(#3)}}}

相关内容