# Forcing specific numbers for tables

I'm working on a paper which will include several tables from a book. I would like to keep the same table numbers as in the book, it makes it easier for people reading the paper in this case. They'll know what table 8.2 is.

Is it possible to force specific numbers to tables? I initially thought of removing tables numbers altogether (I suppose it's possible but haven't checked), but this is not the best solution as I still need to reference the tables in the text.

The tables in the book are not necessarily sequential, so I need to force numbers such as 8.2, 8.5 and 10.1. As a secondary question, the m.n format for the table numbers is not just a mere example: this is how the table numbers are in this case. Is it possible to force tables like this?

If the above are not possible I'll the normal automatic table numbering and use footnotes to reference the original tables, but I hope there's a more straightforward solution.

Thank you.

-

Edit Based on Will's comment, here's a solution that seems to work.

\usepackage{calc}
\newcounter{tablemajor}
\renewcommand\thetable{\arabic{tablemajor}.\arabic{table}}
\newcommand*\settablecounter[2]{%
\setcounter{tablemajor}{#1}%
\setcounter{table}{#2-1}%
}


Then you use it like

\settablecounter{8}{2}
\begin{table}
\caption{First table}\label{tab:first}
This is a table
\end{table}

-
I think if you renewcommand thetable, it wont be possible to cross ref to the table. Better to use refstepcounter on all the appropriate counters and then reset them again. – Will Robertson Sep 4 '10 at 7:57
That's a very good point. I didn't think about more than display. I still maintain that this is probably a bad idea. Possibly creating a new counter for the m portion would work though. – TH. Sep 4 '10 at 8:08
But doesn't this lead to the same numbers being reused if other tables are automatically numbered? – Richard Sep 2 '12 at 13:59

I don't see a reason to use counters if it is not intended to advance this counters. You are actually not asking for numbers but how to use more or less arbitrary text:

Edit: setting \@currentlabel was unnecessary. So I change the code:

\documentclass{article}

\begin{document}
\begin{table}
\renewcommand\thetable{Blub 8.3-x}
\caption{a caption}%
\label{test}
\end{table}

Test ref: \ref{test}
\end{document}

-

I would take an alternative route. I would enclose the tables as figures and caption them as follows:

fig 1: Table 8.5 from Zacharias et al etc

-
I think I'd reproduce the table and simply note that it was Table~8.5 from Foo et~al. – TH. Sep 4 '10 at 8:16
@TH Your suggestion is another reasonable way to handle it. It can also have a caption Table 8.1 Angels versus area of pinheads (reproduced by permission from Table 8.5 by Zacharias et.al). – Yiannis Lazarides Sep 4 '10 at 10:13
Indeed, that's probably what I'll do to keep it simple. I accepted as the answer what TH wrote, however, since that's technically the answer to the question and other LaTeX users may be interested in that particular point. – wishihadabettername Sep 4 '10 at 18:56