3

I've tried to google this in about a dozen different ways, but didn't find anything.

I have an introduction chapter that uses \chapter*. The numbering of the subsections is fine - they're still numbered as 0.X, which is exactly what I want. However, tables and figures are numbered without an initial 0.X, so I simply get Table 1, etc. I would like the Tables to be numbered starting with "Table 0.1" in the introduction.

I also have an appendix which is also produced unnumbered (or lettered). The code from the (dissertation) style file I'm using is shown below. I would like here to have the Tables labelled A.1 or A.2. Currently I get "Table .1" and "Table .2" instead.

\newcount\chap@or@app\chap@or@app=1

\def\appendixname{Appendix}

\def\appendix{\clearpage
    \typeout{Appendix.}
    \short@page                 % <- 9/13/96 (MAL)
        \markboth{}{}\pagestyle{myheadings} % <- The appendix must 
        \thispagestyle{plain}           % <- be numbered.
    \vspace*{\fill}
    \centerline{\large\bf Appendix}
    \vspace*{\fill}

    \addcontentsline{toc}{chapter}{Appendix}  % <-

    \setcounter{chapter}{0}
    \setcounter{section}{0}
    \def\@chapapp{\appendixname}
    \chap@or@app=2
   %\def\thechapter{\Alph{chapter}} % Commented out 15 Aug 02   cwm
                    % as a partial solution to
                    % the problem of labeling
                    % one appendix as Appendix A.
    }
4

Using the chngcntr package, you can write

\counterwithin{table}{chapter}

to get your tables, for example, to be numbered with chapter numbers.

If you don't want to call yet another package, then you can accomplish this also as

\makeatletter
\@addtoreset{table}{chapter}
\renewcommand{\thetable}{\arabic{chapter}.\arabic{table}}
\makeatother

As for the appendix, you should be able to do something like

\renewcommand\thetable{A.\arabic{table}}

And similarly for your figures.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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