![使附录章节标题简单化](https://linux22.com/image/431132/%E4%BD%BF%E9%99%84%E5%BD%95%E7%AB%A0%E8%8A%82%E6%A0%87%E9%A2%98%E7%AE%80%E5%8D%95%E5%8C%96.png)
我对普通章节使用了花哨的章节标题,但我希望附录中的章节看起来有所不同
\documentclass{report}
\usepackage{titletoc}
\usepackage{tocloft}
\usepackage[pagestyles, outermarks, newparttoc]{titlesec}
\usepackage[title]{appendix}
\makeatletter
\titleformat{\chapter}[frame]
{\normalfont}{\filright\enspace \@chapapp~\thechapter\enspace}
{20pt}{\Huge\bfseries\filcenter}%20pt the small line that close the box
\titlespacing*{\chapter}
{0pt}{-35pt}{0pt}
\makeatother
\begin{document}
\chapter{Appedix testing}
\begin{appendices}
\chapter{Appendix A}
\section{subappendix}
\chapter{Appendix B}
\end{appendices}
\end{document}
答案1
titleformat
只需在文档中想要更改的位置进行更改即可:
\documentclass{report}
\usepackage[pagestyles, outermarks, newparttoc]{titlesec}
\usepackage[title]{appendix}
\makeatletter
\titleformat{\chapter}[frame]
{\normalfont}{\filright\enspace \@chapapp~\thechapter\enspace}
{20pt}{\Huge\bfseries\filcenter}
\titlespacing*{\chapter}
{0pt}{-35pt}{0pt}
\makeatother
\begin{document}
\chapter{Appendix testing}
\begin{appendices}
\makeatletter
\titleformat{\chapter}{\Large\bfseries}{\@chapapp~\thechapter:}{.5em}{}
\makeatother
\chapter{Theory}
\section{subappendix}
\chapter{Appendix B}
\end{appendices}
\end{document}