你好,我想在目录中的字母 A 或 B 前添加单词“附录”。
我一直在浏览解决方案,但运气不佳。使用 \appendices 时,我失去了目录中我想保留的“子部分附录”功能。
这是我目前所拥有的:
\documentclass[12pt]{article}
%% Language and font encodings
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[toc,page]{appendix}
%% Sets page size and margins
\usepackage[a4paper,top=1in,bottom=1in,left=1in,right=1in]{geometry}
%% Useful packages
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[colorinlistoftodos]{todonotes}
\usepackage[colorlinks=true, allcolors=black]{hyperref}
\usepackage{url}
\usepackage[natbibapa]{apacite}
\usepackage{nameref}
\usepackage{setspace}
\usepackage{float}
\usepackage{titlesec}
\usepackage{makecell}
\usepackage{adjustbox}
\usepackage{titling}
\usepackage{fancyhdr}
\usepackage{changepage}
\pagestyle{fancy}
\lhead{}
\chead{}
\rhead{}
\lfoot{}
\cfoot{\thepage}
\rfoot{\includegraphics[scale=0.17]{Images/umlogo.jpg}}
\renewcommand\headrulewidth{0pt}
\renewcommand\footrulewidth{0pt}
\usepackage[stable]{footmisc}
\begin{document}
\doublespacing
\renewcommand{\contentsname}{Table of contents}
\newpage
\tableofcontents
\newpage
\input{"Appendix.tex"}
\end{document}
对于附录文件:
\titleformat{\subsection}{\large\bfseries}{\appendixname~\thesubsection :}{0.5em}{}
\appendix
\section*{Appendices}
\addcontentsline{toc}{section}{Appendices}
\renewcommand{\thesubsection}{\Alph{subsection}}
\subsection{Pretests}
\label{apx:pretests}
\subsection{Another appendix Subsection}
答案1
使用appendices
环境和title
和titletoc
选项:
\documentclass[12pt]{article}
%% Language and font encodings
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[toc,page, title, titletoc]{appendix}
%% Sets page size and margins
\usepackage[a4paper,top=1in,bottom=1in,left=1in,right=1in]{geometry}
%% Useful packages
\usepackage{amsmath}
\usepackage[demo]{graphicx}
\usepackage[colorinlistoftodos]{todonotes}
\usepackage{url}
\usepackage[natbibapa]{apacite}
\usepackage{nameref}
\usepackage{setspace}
\usepackage{float}
\usepackage{titlesec}
\usepackage{makecell}
\usepackage{adjustbox}
\usepackage{titling}
\usepackage{fancyhdr}
\usepackage{changepage}
\usepackage[colorlinks=true, allcolors=black]{hyperref}
\pagestyle{fancy}
\lhead{}
\chead{}
\rhead{}
\lfoot{}
\cfoot{\thepage}
\rfoot{\includegraphics[scale=0.17]{Images/umlogo.jpg}}
\renewcommand\headrulewidth{0pt}
\renewcommand\footrulewidth{0pt}
\usepackage[stable]{footmisc}
\begin{document}
\doublespacing
\renewcommand{\contentsname}{Table of contents}
\newpage
\tableofcontents
\begin{appendices}
\section{Pretests}
\label{apx:pretests}
\section{Another appendix Subsection}
\end{appendices}
\end{document}