Graphics, Figures & Tablesmanual numbering of tables

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
dajense
Posts: 4
Joined: Thu Sep 03, 2009 3:43 pm

manual numbering of tables

Post by dajense »

Hi,
I need to refere to tables which numbers are set outside the document that I am writing. So I need to switch of the automatic numbering for specific tables and set those numbers myself. Labels should then point to the set number. I.E

First table in chapter 2 should be numbered: 1.3 and using labels to reference that label should return: table 1.3

I really don't know how to do this?
Thanks

Recommended reading 2024:

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

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

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

manual numbering of tables

Post by gmedina »

Hi,

you can manually renumber your tables by redefining the \thetable command; take a look at the following simple example:

Code: Select all

\documentclass{book}

\begin{document}

\chapter{Test chapter}

\begin{table}[!ht]
  \renewcommand\thetable{4.5}
  \centering
  \rule{4cm}{2cm}% to simulate an actual table
  \caption{test table}
  \label{tab:test}
\end{table}

As we see in table \ref{tab:test}...

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
dajense
Posts: 4
Joined: Thu Sep 03, 2009 3:43 pm

Re: manual numbering of tables

Post by dajense »

Thanks a lot to gmedina. That's exactly what I needed.
For others: Put
\renewcommand\thetable{4.5}
before the caption, else it woun't work. :D
Post Reply