答案1
numberless
以下是我使用以下密钥执行的操作titlesec
:
\documentclass{report}
\usepackage[utf8]{inputenc}
\usepackage{titlesec}
\titleformat{name=\chapter, numberless}[block]{\bfseries\huge\filleft}{}{0em}{\MakeUppercase}[{\titlerule[1pt]}]
\titleformat{name=\chapter}[display]{\bfseries\huge\filleft}{\chaptername~\thechapter}{3ex}{\MakeUppercase}[{\titlerule[1pt]}]
\begin{document}
\tableofcontents
\listoffigures
\chapter{First chapter}
\begin{figure}
\caption{Dummy figure}
\end{figure}
\end{document}