1. 問題:
最近寫 LaTex 文檔的附錄,需要 Appendix 的每一節標題改為 "Appendix A xxx", "Appendix B xxx" 式樣
但使用如下命令
\appendix
\renewcommand{\appendixname}{\appendixname~\Alph{section}}
沒有成功,顯示的標題仍然是 "A xxx", "B xxx"。效果如下:
2. 解決辦法:
查看了劉海洋前輩的書籍 《LaTex 入門》,其第 131 頁第一行提到了 appendix 宏包提供了一些額外的定制功能,於是順着參考文獻,去 CTAN 網站上查看了 appendix 宏包的使用指南。使用如下的命令:
\usepackage[title]{appendix}
\begin{document}
\begin{appendices}
\section{xxx}
附錄內容
\section{xxx}
...
\end{appendices}
\end{document}
最終實現了效果如下:
順利完成任務! (▽)
3. 后續更新:
2020.12.5 update:在 IJCAI 和 AAAI 模板上都能起到作用,但似乎在 ICML 模板上無效,可能 icml 的 .sty 文件有相關限制。