Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Having made the changes Werner very helpfully suggested in the Separate table of appendices - pdf bookmarks & avoid previous chapter's format, my list is up and running but I have some spacing problems.

I now have an extra space before my figure and table numbers from the appendices. For example, A.1 in the table of contents. This means it no longer lines up with the lines from the main chapters. In the entry in the .lot file there is a space before { A.1}.

Misaglined List of Tables/Figures with entries from appendeices

Here is the a minimal working example (or at least my best shot at it):

\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}
share|improve this question
5  
As your two questions cover two separate matters, please remove one of them from this question and post it as a new question. This way, other users looking for help can find solutions more easily. Also don't forget to provide a minimal working example (MWE) for each question. –  doncherry Jan 7 '12 at 21:16
8  
And please use a better title for your questions. –  Martin Schröder Jan 7 '12 at 22:21
    
The spacing tag seems to be appropriate for your first question. –  lockstep Jan 8 '12 at 3:11
add comment

1 Answer

up vote 5 down vote accepted

There are spurious blank spaces in the redefinition of \thefigure and \thetable; use:

\renewcommand{\thefigure}{\theappendix.\arabic{figure}}
\renewcommand{\thetable}{\theappendix.\arabic{figure}}

(in both cases I removed the blank spaces before \theappendix).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.