答案1
\@makechapterhead
以下是from的原始定义report.cls
:
\def\@makechapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\huge\bfseries \@chapapp\space \thechapter
\par\nobreak
\vskip 20\p@
\fi
\interlinepenalty\@M
\Huge \bfseries #1\par\nobreak
\vskip 40\p@
}}
上面的宏设置了你使用的 header \chapter
。让我们更改它以匹配你的输出:
\documentclass[12pt]{report}
\makeatletter
\def\@makechapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedleft \normalfont
\ifnum \c@secnumdepth >\m@ne
\large\bfseries \MakeUppercase{\@chapapp}\space \thechapter
\par\nobreak
\vskip 10\p@
\rule[.5ex]{\textwidth}{.4pt}%
\vskip 10\p@
\fi
\interlinepenalty\@M
\large \bfseries \MakeUppercase{#1}\par\nobreak
\vskip 40\p@
}}
\makeatother
\usepackage{lipsum}
\begin{document}
\chapter{Introduction}
\lipsum
\end{document}
\large
12pt
在文档类别选项下会生成一个字体14pt
。您可以在定义中添加字体选择。
答案2
像这样吗?
\documentclass[12pt, a4paper]{book} \usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fourier, erewhon}
\usepackage{microtype}
\SetTracking[no ligatures={f}]{encoding=*}{100}
\usepackage{lipsum}
\usepackage{titlesec}%
\titleformat{\chapter}[display]
{\bfseries\Large\lsstyle\SetTracking[no ligatures = {f}]{encoding = *}{50}\filleft}
{\MakeUppercase{\chaptername}\enspace\thechapter}
{2ex}
{\titlerule[1pt]\vspace{2ex}\MakeUppercase}%
\titlespacing*{\chapter}{0pt}{-60pt}{10ex}
\begin{document}
\chapter{Introduction}
\lipsum[1]
\end{document}