# How can I edit the caption of a LaTeX table

I have a problem with the caption of LaTeX tables. Is there any way to edit the caption of my LaTeX tables so that not all captions start with “Table1”

Can I edit the second file into displaying “Table 2” somehow? My tables are not all in a single file but each table is coded in a different file but I suppose that should not be the problem

\caption{bla}
\label{tab:xyz}
\end{table}
\end{document}


In case there is no simpel solution hwo could I integrate these tables

\documentclass[12pt]{article}
\usepackage{multirow}
\usepackage[landscape]{geometry}

\begin{document}
\begin{table}[ht]
\begin{center}
\begin{tabular}{ |l|l|l|l|l|}
\hline
% TABLE content
\hline
\end{tabular}
\end{center}
\caption{bla}
\end{table}
\end{document}


\documentclass[12pt]{article}
\usepackage{multirow}
\usepackage[landscape]{geometry}
\usepackage{booktabs}
\let\centering\relax
\begin{document}
\begin{table*}\centering
\ra{1.3}
% TABLE CONTENT
\bottomrule
\end{tabular}
\caption{bla2}
\end{table*}
\end{document}

-
Welcome to TeX.sx! Can you be more precise about your workflow? – egreg Jan 28 '13 at 22:46
could you specify? I have several tables in different txt files ( I use MIKtex to compile them). While I can edit the 'bla'part the finished pdf always exhibits Table1:bla...... – Tim Heinert Jan 28 '13 at 22:49
table-caption-without-the-word-table and how-to-remove-figure-label might be helpful. – Pouya Jan 28 '13 at 22:49
@TimHeinert Usually the tables are put in the main file, not in separate files; in any case you don't compile separately them: use \input (and the included files shouldn't have \documentclass and \begin{document}. – egreg Jan 28 '13 at 22:53
@Tim --- I don't understand what you want. Your last comment seems to contradict the one before! – Ian Thompson Jan 28 '13 at 23:37

If you have good reason to keep your tables in separate files, you can fix your problem by adjusting the {table} counter, like this:

\setcounter{table}{9}
\begin{table}
(whatever)
\caption{This will be numbered Table 10.''}
\end{table}


Note that you set it to the value it would have had before the table in question.

But do you really have good reason to keep your tables in separate documents? By doing so, you lose out on LaTeX's automatic numbering and all sorts of other goodies. If you can rearrange your workflow so that you can generate all tables in a single document, you'll be better off in the long run.

-

If you put two tables in the same document they will be numbered consecutively.

\documentclass{article}
\begin{document}
\begin{table}
\centering
\begin{tabular}{|c|}\hline
This is a table \\ \hline
\end{tabular}
\caption{The first table.}
\end{table}
%
\begin{table}
\centering
\begin{tabular}{|c|}\hline
This is another table \\ \hline
\end{tabular}
\caption{The second table.}
\end{table}
\end{document}


If the code gets too long, you can place everything from \begin{table} to end{table} in a separate file, say 'table1.tex' and then put \input{table1} in your main document.

-