在 Werner 非常乐意地建议下进行了修改后,附录单独表格 - pdf 书签并避免上一章的格式,我的列表已启动并运行,但我遇到了一些间距问题。
现在,附录中的图表和表格编号前多了一个空格。例如,A.1
在目录中。这意味着它不再与主要章节中的行对齐。在文件的条目中,.lot
之前有一个空格{ A.1}
。
这是一个最小的工作示例(或者至少是我尽力而为的):
\documentclass[]{ut-thesis}
\usepackage{tocloft}
\usepackage[colorlinks=true, allcolors=black]{hyperref}
\begin{document}
\newcommand{\listappendixname}{List of Appendices}
\newlistof{appendix}{app}{\listappendixname}
\setcounter{appdepth}{2}
\renewcommand{\theappendix}{\Alph{appendix}}
\renewcommand{\cftappendixpresnum}{Appendix\space}
\setlength{\cftbeforeappendixskip}{\baselineskip}
\setlength{\cftappendixnumwidth}{1in}
\newlistentry[appendix]{subappendix}{app}{1}
\renewcommand{\thesubappendix}{\theappendix.\arabic{subappendix}}
\renewcommand{\cftsubappendixpresnum}{Appendix\space}
\setlength{\cftsubappendixnumwidth}{1in}
\setlength{\cftsubappendixindent}{0em}
\newcommand{\myappendix}[1]{%
\refstepcounter{appendix}\pdfbookmark[1]{#1}{#1\theappendix}%
\chapter*{Appendix \theappendix\space #1}%
\addcontentsline{app}{appendix}{\protect\numberline{\theappendix}#1}%
\markboth{}{\MakeUppercase{Appendix}\ \theappendix\space #1}\par
}
\newcommand{\subappendix}[1]{%
\refstepcounter{subappendix}\pdfbookmark[2]{#1}{#1\thesubappendix}%
\section*{\thesubappendix.\space #1}%
\addcontentsline{app}{subappendix}{\protect\numberline{\thesubappendix}#1}%
}
\begin{preliminary}
\listoftables
\listoffigures
\end{preliminary}
\chapter{Objective}
\section{Get it done}
\begin{figure}
\caption[Short name for a figure]{Loooong name for the figure with lots of explanation}
\end{figure}
\begin{table}
\caption[Short name for my table]{Loooong name for the my with lots of explanation}
\end{table}
\appendix
\clearpage \phantomsection
\addcontentsline{toc}{chapter}{Appendices}
\renewcommand{\thefigure}{ \theappendix.\arabic{figure}}
\renewcommand{\thetable}{ \theappendix.\arabic{figure}}
\myappendix{VBA code for Extension of Jaccard Measure}
\label{chap:code}
\begin{figure}
\caption[Code for functions that do this and that]{}
\end{figure}
\begin{table}
\caption[Table showing not very much]{}
\end{table}
\end{document}
答案1
\thefigure
和的重新定义中有虚假的空格\thetable
;使用:
\renewcommand{\thefigure}{\theappendix.\arabic{figure}}
\renewcommand{\thetable}{\theappendix.\arabic{figure}}
(在这两种情况下,我都删除了之前的空格\theappendix
)。