GeneralChange reference labels

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
zigga150
Posts: 7
Joined: Thu Sep 10, 2009 9:35 am

Change reference labels

Post by zigga150 »

Hey guys,

Just working on my thesis. I am using the book document style and everything is
set out in chapters.

Currently, my appendix is set up as a chapter as well. Everything looks find but
rather than my figures and tables in appendix being captioned with "Table 6.1: blah"
I need them to be labeled "Table A", "Figure A" etc.

As I am using a template for my thesis I am about confused about how the system works. Is there an easy way to change the numbering of references in one particular chapter.

Any help, or a nudge in the right direction would be great.

Regards,

Dan

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Change reference labels

Post by Stefan Kottwitz »

Hi Dan,

if you want to change the numbering I recommend to use the chngcntr package, it allows numbering within sections or chapters and also to remove this behavior.

Further you could modify a counter by yourself using \setcounter:

Code: Select all

\setcounter{table}{5}
You could also reset to 0.

To change the appearance of the table or figure counter redefine \thetable or \thefigure, for example:

Code: Select all

\renewcommand*\thetable{\Alph{table}}
See: LaTeX counters.

Stefan
LaTeX.org admin
ChE
Posts: 7
Joined: Sat Oct 17, 2009 2:51 pm

Change reference labels

Post by ChE »

I assume your appendix is at the very end of your thesis, yes? Can you not just use \appendix on the line before your appendix begins, and then use chapters normally?

So something like this:

Code: Select all

\documentclass[oneside]{book}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}

\begin{document}

% Normal part

\chapter{Blah}

Blah blah blah

\appendix % Appendix starts here

\chapter{Blah}

\begin{table}
\caption{Blah.}
\begin{tabular}{|c|c|c|c|c|}
\hline 
 &  &  &  & \tabularnewline
\hline
\hline 
 &  &  &  & \tabularnewline
\hline 
 &  &  &  & \tabularnewline
\hline 
 &  &  &  & \tabularnewline
\hline 
 &  &  &  & \tabularnewline
\hline
\end{tabular}
\end{table}
\end{document}
Regards,
ChE
zigga150
Posts: 7
Joined: Thu Sep 10, 2009 9:35 am

Change reference labels

Post by zigga150 »

Hey guys,

Thanks very much for the reply, however I am still having a bit of trouble.

Basically, what I am doing is banging all my figures, listings, tables in chap7.tex

During the other chapters I am using something like:

Code: Select all

 \textit{(see Table \ref{table})}
Basically rather than having it say: (see Table 7.1) I need it to say: (see Table A)

I have tried the \appendix suggestion and I am currently investigating the chngcntr package.

Anymore advise would be appreciated I will let you know if I find the solution :)

As always, thanks very much.

~ Dan
Post Reply