
是否可以將「附錄 X」放在同一行上,也許在附錄標識符字母後面加上一個冒號?
微量元素:
\documentclass{report}
\begin{document}
\tableofcontents
\chapter{CHapter one name}
\chapter{Chapter two name two}
\appendix
\chapter{Theory}
\section{Some theory}
\section{Some other theory}
\chapter{Method}
\section{LOLZ}
\section{ROLF}
\end{document}
正如你所看到的,編譯後的 PDF 寫道:
Appendix A
Theory
A.1 Some Theory
我希望它是這樣的:
Appendix A: Theory
A.1 Some Theory
答案1
這是一種方法,用titlesec
和apptools
。附錄章節位於頁面頂部,但間距參數可以隨意變更:
\documentclass{report}
\usepackage{showframe}
\usepackage{titlesec}
\usepackage{apptools}
\AtAppendix{\titleformat{\chapter}[block]{\LARGE\bfseries}{\appendixname~\thechapter:}{0.333em}{}%
\titlespacing*{\chapter}{0pt}{-20pt}{40pt}}
\begin{document}
\tableofcontents
\chapter{Chapter one name}
\chapter{Chapter two name two}
\appendix
\chapter{Theory}
\section{Some theory}
\section{Some other theory}
\chapter{Method}
\section{LOLZ}
\section{ROLF}
\end{document}